inventory_snapshot

Fetch inventory snapshot records matching the supplied arguments.

Arguments

ArgumentTypeRequiredDefaultDescription
snapshot_idString!Yes

Filter by snapshot ID; pass the public API ID unless the field name says legacy ID. Required.

analyzeBooleanNo

If true, the query will only be analyzed (cost estimated) without executing it.

Return Type

InventorySnapshotQueryResult

Query

query inventory_snapshot(
  $snapshot_id: String!,
  $analyze: Boolean
) {
  inventory_snapshot(
    snapshot_id: $snapshot_id,
    analyze: $analyze
  ) {
    request_id
    complexity
    data {
      ...InventorySnapshotFragment
    }
    snapshot {
      ...InventorySnapshotFragment
    }
  }
}

Variables

{
  "snapshot_id": "SW52ZW50b3J5U25hcHNob3Q6MTIzNA==",
  "analyze": true
}

Response

{
  "data": {
    "inventory_snapshot": {
      "request_id": "UmVjb3JkOjEyMzQ=",
      "complexity": 100,
      "data": {id: "SW52ZW50b3J5U25hcHNob3Q6MTIzNA=="},
      "snapshot": {id: "SW52ZW50b3J5U25hcHNob3Q6MTIzNA=="}
    }
  }
}