Skip to main content

Query Quickstart

This page should give you an overview of the GraphQL schema definition that describes a set of types and operations for managing and retrieving data related to a vehicle and associated systems.

Here's a summary of the key components:

Queries:

getVehicleData

Example:

Input: VehicleDataQueryInput

Dimensions: Dimensions

Timewindow: TimeWindow

query MyQuery {
getVehicleData(queryInput: {dimensions: {imei: "", vin: ""}, timeWindow: {end: "", start: ""}}) {
# Fields you want to retrieve in the response
assetType
imei
tcuType
timestamp
...
}
}

Output: VehiclePayload

Example Return:
"data":
{
"getVehicleData":
[
{ "assetType": "vehicle", "imei": "abc:defg123", "tcuType": "core", "timestamp": 1705061335307 },
{ "assetType": "vehicle", "imei": "eeg:defg12345", "tcuType": "core", "timestamp": 1705061325308 },
...,
],
}

getVehicleOverview

Example:

Input: VehicleOverviewQueryInput

Dimensions: Dimensions

Timewindow: TimeWindow

query MyQuery {
getVehicleOverview(queryInput: {dimensions: {batteryChargingState: "", brand: "", imei: "", process: FLEETVEHICLESLIST, vin: "", timeInterval: MINUTE, siteName: ""}, timeWindow: {end: "", start: ""}}) {
vin
imei
brand
...
}
}

Output: VehicleOverview

Example Return:
"data": { 
"getVehicleOverview": [
...
]
}

getVehicleTrips

Example:

Input: vehicletripsqueryinput

Dimensions: Dimensions

Timewindow: TimeWindow

query MyQuery {
getVehicleTrips(queryInput: {dimensions: {}, timeWindow: {}}) {
vin
tripStartDate
tripEndDate
tripDuration
...
}
}

Output: VehicleOverview

Example Return:
"data": { 
"getVehicleTrips": [
...
]
}

getVehicleState

Example:

Input: vehiclestatequeryinput

Dimensions: Dimensions

Timewindow: TimeWindow

query MyQuery {
getVehicleState(queryInput: {dimensions: {siteName: "", vin: "", timeInterval: MINUTE}, timeWindow: {end: "", start: ""}}) {
batteryTemperature
brand
}
}

Output: vehiclestate

Example Return:
"data": { 
"getVehicleState": [
...
]
}

getVehicleCharges

Example:

Input: vehiclechargesqueryinput

Dimensions: Dimensions

Timewindow: TimeWindow

query MyQuery {
getVehicleCharges(queryInput: {dimensions: {siteName: "", timeInterval: MINUTE, vin: ""}, timeWindow: {start: "", end: ""}}) {
brand
chargingEndSoC
...
}
}

Output: vehiclecharges

Example Return:
"data": { 
"getVehicleCharges": [
...
]
}

getVehicleChargesCounts

Example:

Input: vehiclechargesqueryinput

Dimensions: Dimensions

Timewindow: TimeWindow

query MyQuery {
ggetVehicleTrips(queryInput: {dimensions: {}, timeWindow: {}}) {
vin
tripStartDate
tripEndDate
tripDuration
...
}
}

Output: vehiclechargescounts

Example Return:
"data": { 
"getVehicleChargesCounts": [
...
]
}

getVehicleChargesCountsByBrand

Example:

Input: vehiclechargesqueryinput

Dimensions: Dimensions

Timewindow: TimeWindow

query MyQuery {
getVehicleChargesCountsByBrand(queryInput: {dimensions: {siteName: "", timeInterval: MINUTE, vin: ""}, timeWindow: {end: "", start: ""}}) {
brand
chargingEvents
imei
...
}
}

Output: vehiclechargescountsbybrand

Example Return:
"data": { 
"getVehicleChargesCountsByBrand": [
...
]
}

getFleetDistribution

Example:

Input: FleetDistributionInput

Dimensions: Dimensions

query MyQuery {
getFleetDistribution(queryInput: { dimensions: { siteName: "" } }) {
brand
count
}
}

Output: FleetDistributionOverview

Example Return:
"data": { "getFleetDistribution": [...] }

getFleetAssets

Example:

Input: VehicleFleetAssetsInput

Dimensions: Dimensions

query MyQuery {
getFleetAssets(queryInput: { dimensions: { field: vin, siteName: "" } }) {
brand
imei
siteName
vin
}
}

Output: VehicleFleetDetails

Example Return:
"data": { "getFleetAssets": [...] }

getEESData

Example:

Input: EESQueryInput

Dimensions: Dimensions

Timewindow: TimeWindow

query MyQuery {
getEESData(input: { dimensions: { eesId: "", imei: "" }, timeWindow: { end: "", start: "" } }) {
entity
tcuType
timestamp
assetType
status
}
}

Output: EESPayload

Example Return:
"data": { "getEESData": [...] }