Skip to main content
POST
/
api
/
v2
/
data
GetData
curl --request POST \
  --url https://your-sift-api-url.com/api/v2/data \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "queries": [
    {
      "channel": {
        "channelId": "<string>",
        "runId": "<string>"
      },
      "calculatedChannel": {
        "channelKey": "<string>",
        "expression": {
          "expression": "<string>",
          "channelReferences": {},
          "expressionChannelReferences": [
            {
              "channelReference": "<string>",
              "channelId": "<string>"
            }
          ],
          "functionDependencies": [
            {
              "userDefinedFunctionVersionId": "<string>"
            }
          ]
        },
        "runId": "<string>",
        "mode": "EXPRESSION_MODE_UNSPECIFIED",
        "combineRunData": true
      }
    }
  ],
  "startTime": "2023-11-07T05:31:56Z",
  "endTime": "2023-11-07T05:31:56Z",
  "sampleMs": 123,
  "pageSize": 123,
  "pageToken": "<string>"
}
'
{
  "data": [
    {
      "@type": "<string>"
    }
  ],
  "nextPageToken": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
queries
object[]
startTime
string<date-time>

Required. The starting timestamp of the data to retrieve. This is an inclusive bound.

endTime
string<date-time>

Required. The end timestamp of the data to retrieve. This is an exclusive bound.

sampleMs
integer<int64>

The rate to sample the returned data at. The data is sampled using LTTB which will return one point approximately every sample_ms milliseconds that retains the shape of the raw data. Sampling is only supported for numeric data types, if sample_ms is provided for non-numeric data, it will be ignored and the full-fidelity data will be returned.

pageSize
integer<int64>

The maximum number of channel values to return. The service may return fewer than this value. If unspecified, at most 10,000 values will be returned. The maximum value is 100,000; values above 100,000 will be coerced to 100,000. For variable data types (i.e. string channels), at most page_size elements will be read, or 1MB, whichever occurs first.

pageToken
string

A page token, received from a previous GetData call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to GetData must match the call that provided the page token.

Response

A successful response.

data
data contains the result of the supplied queries. Be aware that each query can generate multiple data responses. For example, if run_id is omitted from a ChannelQuery, the query returns data for all runs containing that channel. Channel data for each run is returned in a separate data object. Possible message types: sift.data.v2.DoubleValues sift.data.v2.FloatValues sift.data.v2.StringValues sift.data.v2.EnumValues sift.data.v2.BitFieldValues sift.data.v2.BoolValues sift.data.v2.Int32Values sift.data.v2.Int64Values sift.data.v2.Uint32Values sift.data.v2.Uint64Values sift.data.v2.BytesValues · object[]
required
nextPageToken
string