Skip to content

tracks

Query

Finds tracks, which are records of a detected object over time, based on a set of filters.

Response

Returns TrackConnection

Arguments

NameTypeDescription
filterFilterTrackInput!

Filter tracks based on the originating device, time period, etc.

firstInt!

Returns the first n elements from the list.

Default: 20

afterString

Returns the elements in the list that come after the specified cursor.

sort[TracksSort!]!

The field and direction by which to sort the results

Default: [{ field: TRACK_START_TIME, direction: ASC }, { field: ID, direction: ASC }]

Example

query tracks(
$filter: FilterTrackInput!,
$first: Int!,
$after: String,
$sort: [TracksSort!]!
) {
tracks(
filter: $filter,
first: $first,
after: $after,
sort: $sort
) {
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
edges {
node {
id
modelId
tag
startTime
endTime
finished
metadata
}
cursor
}
totalCount
}
}