Introduction
Retrieve raw vehicle data objects and index keys from cloud storage.
Overview
The Fetch API provides access to raw vehicle data stored in the cloud. Like the [Telemetry API](/docs/api-references/telemetry-api/introduction), it is written in GraphQL and exposes a single endpoint,
/query, for executing queries. You can retrieve CloudEvent-formatted data and index keys for a vehicle by did (ERC721 DID), and request only the fields you need—for example, header and/or data.Base URL
https://fetch-api.dimo.zoneEndpoints
Developer Notes
To access vehicle data via the Fetch API, a token exchange is required to obtain a Vehicle JWT. The vehicle must have been shared with your app with raw data permission. When requesting the token (e.g. via the Token Exchange API), include the privilege that grants raw data access. See Authentication and the Token Exchange API for details.
Schema & Types
CloudEvent
Full CloudEvent: selectableheader, data (JSON), and optional dataBase64. Request only the fields you need.CloudEventHeader
CloudEvents v1.0 header fields:id, source, producer, specversion, subject, time, type, and optional datacontenttype, dataschema, dataversion, signature, tags.CloudEventIndex
Index entry:header (CloudEventHeader) and indexKey (storage key).CloudEventFilter
Optional filter for queries. All fields are optional.CloudEventFilter fields
idFilter by event identifier.
typeFilter by event type (e.g. reverse-DNS format).
sourceFilter by source context.
producerFilter by producer (instance/process/device).
beforeReturn results before this time (RFC-3339).
afterReturn results after this time (RFC-3339).
# Sample Fetch API Query
query {
latestCloudEvent(
did: "did:eth:1:0x...:123456",
filter: { type: "dimo.status" }
) {
header {
id
type
time
source
}
data
}
}
Scalars
The Fetch API uses two custom scalars in addition to GraphQL built-ins:
TimeA point in time, encoded per RFC-3339. Typically in UTC (e.g. 2024-06-01T12:00:00Z).
JSONArbitrary JSON value; serialized as raw JSON (object/array), not an escaped string.
# Query with header and data
query {
cloudEvents(
did: "did:eth:1:0x...:123456",
limit: 5,
filter: { type: "dimo.status" }
) {
header { id type time }
data
}
}