Skip to content

Example queries

Example 1 - Query summary of a media by its name.

The database should be loaded with an example from the video V4333_20210428T162206Z_h264.mp4.

query {
  tracksByMediaName(name: "V4333_20210428T162206Z_h264.mp4") {
      track_uuid
      surprise
      start
      end
  }
}

Example 2 - Query summary of a M3 video by its media name with a query function

The same query above can be put into a function.

Note

Notice how the variable $id is referenced in the QUERY VARIABLES panel by the id field.

query myTrackSummaryByVideo($name: String!) {
    tracksByMediaName(name: $name) {
        track_uuid
        surprise
        start
        end
  }
}

QUERY VARIABLES

{
  "name" : " V4333_20210428T162206Z_h264.mp4"
}

Example 3 - Query visual events by media and paginate

Returns 30 events at a time, starting at the 10th event; repeat by incrementing skip to paginate

query {
  visualEventsByMedia(media_name: "V4333_20210428T162206Z_h264.mp4",
  take: 30, skip: 10)
{
  id
  y
  uuid
  track_uuid
}
}

Example 4 - Query statistics by unique job identifier

The query string:

query {
  statistics(uuid: "bb60f25e-6bb5-2d4d-d837-390c5da1e027") {
      totalEvents
      totalTracks
      totalConcepts
      trackDetail
}
}

Example 5 - Query all jobs

The query string:

query {
  jobs {
    uuid
  }
}