Common Queries

Here's a list of common queries that developers might find useful:

Getting a list of available signals for a specific vehicle
query {
  availableSignals(
    tokenId: ${tokenId}
  )
}
Getting a selection of daily signals from a specific data source (AutoPi shown as example)
query {
  signals(
    tokenId: ${tokenId}, 
    interval: "24h",
    from: "${startDate}", to: "${endDate}", 
    filter: {
      source: "autopi"
    }) 
  {
    speed(agg: MED)
    powertrainType(agg: RAND)
    powertrainRange(agg: MIN) 
    exteriorAirTemperature(agg: MAX)
    vehicleIdentificationModel(agg: RAND)
    chassisAxleRow1WheelLeftTirePressure(agg: MIN)
    timestamp
  }
}
Getting the daily average speed of a specific vehicle
query {
  signals(
    tokenId: ${tokenId}, 
    from: "${startDate}", to: "${endDate}", 
    interval: "24h" 
    ) 
  {
    timestamp
    avgSpeed: speed(agg: AVG)
  }
}
Getting the max speed of a specific vehicle
query {
  signals(
    tokenId: ${tokenId}, 
    from: "${startDate}", to: "${endDate}", 
    interval: "${24 * numDays}h" 
    ) 
  {
    timestamp
    maxSpeed: speed(agg: MAX)
  }
}
Getting the VIN of a specific vehicle (Need VIN VC from Attestation API)
query {
  vinVCLatest(tokenId: ${tokenId}) {
    vin
  }
}

Last updated