Introduction
Open catalog of DIMO-connected vehicles, and other entities.
Overview
The Identity API serves as an open registry for vehicles and developers on the DIMO Network. All data in the Identity API is public, can be read by anyone, and does not require any authentication. The DIMO Identity API is written in GraphQL, and there is only a single endpoint,/query, which is used for executing queries.Base URL
https://identity-api.dimo.zoneEndpoints
Schema and Types
The basic unit of components of a GraphQL schema are object types - it represents an object you can fetch for and the definitions of what fields will be included in the response. A representation of GraphQL schema language may look like this in Identity API:SyntheticDeviceSyntheticDevice is a GraphQL Object Type, meaning it's a type with some fields. Most of the types in your schema will be object types.
tokenId, integrationId, address, and mintedAtFields on the SyntheticDevice type. That means these 4 fields can appear in any part of a GraphQL query that operates on the SyntheticDevice type.
IntOne of the built-in scalar types - these are types that resolve to a single scalar object, and can't have sub-selections in the query.
Int!Means that the field is non-nullable, meaning that the DIMO GraphQL service promises to always return a value when queried.
type SyntheticDevice {
tokenId: Int!
integrationId: Int!
address: Address!
mintedAt: Time!
}
Scalars
Scalars are the value types that every field in a GraphQL document eventually resolves to. It can be viewed as the primitive data type that stores a single value. There are 5 built-in scalars: int, float, string, Boolean, and id - we have also defined custom scalars to help define the data we return.AddressA 20-byte Ethereum address, encoded as a checksummed hex string with 0x prefix.
BigDecimalAn arbitrary-precision decimal data type, per the General Decimal Arithmetic specification.
BigIntAn integer of arbitrary precision, decimal-encoded. Typically a uint256.
BooleanRepresents a boolean value that can be either true or false.
BytesAn array of byte, encoded as a lowercase hex string with 0x prefix.
FloatA signed double-precision floating-point value.
IDA unique identifier, often used to refetch an object or as a key for caching.
IntA signed 32-bit integer.
StringA UTF-8 character sequence.
TimeA point in time, encoded per RFC-3999. This is in second precision and in UTC, an example would be 2023-12-04T18:32:12Z.
# Sample query
query GetVehicleMMY($MyAddress: Address!) {
vehicles(filterBy: {owner: $MyAddress}, first: 100) {
nodes {
tokenId
tokenDID
definition {
make
model
year
}
}
}
}