Skip to main content

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.zone

Endpoints

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: selectable header, 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

id
Filter by event identifier.
type
Filter by event type (e.g. reverse-DNS format).
source
Filter by source context.
producer
Filter by producer (instance/process/device).
before
Return results before this time (RFC-3339).
after
Return 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:

Time
A point in time, encoded per RFC-3339. Typically in UTC (e.g. 2024-06-01T12:00:00Z).
JSON
Arbitrary 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
}
}