Skip to content

Example queries

Example 1 - Query all available machine classes

Outputs machine-friendly names to VAR class mappings Image link

Example 2 - Query summary of a M3 video by its unique identifer.

The database should be loaded with a 60 second example from the VARS video V3136_20071206T211301Z_16-20-58-06TC_prores.mov. This file can be queried by its unique id d73fa89d-cc13-4128-91dc-3bbc22b75052

[click the image below to see a larger example] Image link The query string:

query {
  trackSummaryByVideo(videoReferenceUuid: "21d00e55-86e7-4d59-bf42-d57eb0e4b902") {
    uuid
    surprise
    start
    end
  }
}

Example 3 - Query summary of a M3 video by its unique identifer with a query function

Note

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

[click the image below to see a larger example] Image link The query string:

query myTrackSummaryByVideo($id: String!) {
    trackSummaryByVideo(videoReferenceUuid: $id) {      
      uuid
      start
      end
  }
}

QUERY VARIABLES

{
  "id" : "21d00e55-86e7-4d59-bf42-d57eb0e4b902"
}

Example 4 - Query predicted concepts and each event for a M3 video by its unique identifer

[click the image below to see a larger example] Image link The query string:

query {
  tracks(
    where:{
      videoReferenceUuid:{
        equals:"21d00e55-86e7-4d59-bf42-d57eb0e4b902"
      }
    }
  ) {
    varsConcept
    predictedVarsConcept
    events {
      id
      uuid
      x
      y
      frameNum
      width
      height
      time
    }
  }
}

Example 5 - Query events by video and paginate

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

[click the image below to see a larger example] Image link The query string:

query {
  eventsByVideo(videoReferenceUuid: "21d00e55-86e7-4d59-bf42-d57eb0e4b902",
    take: 30, skip: 10)
  {
    id
    uuid
    x
    y
    predictedVarsConcept
  }
}