Query data from the vehicle
When a connected vehicle is successfully authorized, live data can be retrieved with the connectedVehicleData
query.
Query
To query data from a connected vehicle provide its id
as an argument. Make sure that the vehicle is authorized otherwise you will receive a CONNECTED_VEHICLE_FORBIDDEN
exception.
Arguments
id • ID
• Required
Id from the connected vehicle
Other fields
battery • ConnectBattery
Battery data
charge • ConnectCharge
Charge data
location • ConnectLocation
Location data
odometer • ConnectOdometer
Odometer data
Response
A response can either contain a data
or an
errors
object. The response header will always return
200
as a status code.
Data object
When successful, a data
object will be returned with the
requested fields. If there are no fields present the
data
object will return the operation name with the
appropriate return type. If the operation was a query, this output
will be an object of the schema’s query root type; if the operation
was a mutation, this output will be an object of the schema’s mutation
root type.
Error object
If unsuccessful, an errors
object will be returned with
more details in the extensions
object. The error object
can contain any of the following objects.
AUTH_TOKEN_EXPIRED
The token you provided is expired
AUTH_TOKEN_INVALID
The token you provided is invalid
CONNECT_PROVIDER_NOT_ALLOWED
The Connect provider $PROVIDER is not configured for your client id. Please contact customer support to enable it!
CONNECTED_VEHICLE_FORBIDDEN
The vehicle does not seem to be authorized yet. To complete this action, first complete the authorization flow.
CONNECTED_VEHICLE_NOT_FOUND
The connected vehicle was not found
ENODE_PROXY_EXCEPTION
Enode remote did throw an exception that could not be handled