Skip to main content

Query Reference

Query references for the Identity API.

AftermarketDevice

The AftermarketDevice resource is a hardware connection established to connect the vehicle to the DIMO network. This refers to viewing a particular device.

Arguments

tokenIdInt
addressAddress
serialString
{
aftermarketDevice(by: { tokenId: 1, address: "0x", serial: "123" }) {
id
tokenId
manufacturer {
name
}
address
owner
serial
imei
mintedAt
claimedAt
vehicle {
name
}
beneficiary
name
image
earnings {
totalTokens
}
}
}

Hierarchy

idID!
A unique global identifier for the aftermarket device.
tokenIdInt!
The ERC-721 token identifier for the device.
manufacturerManufacturer
The manufacturer of the device.
addressAddress!
A 20-byte Ethereum address registered on the blockchain for the device, encoded as a checksummed hex string with 0x prefix.
ownerAddress!
A 20-byte Ethereum address registered on the blockchain for the owner of the device, encoded as a checksummed hex string with 0x prefix.
serialString
The serial number on the physical device.
imeiString
The International Mobile Equipment Identity (IMEI) for the device.
mintedAtTime!
The RFC-3339 timestamp at which the device was minted, formatted as YYYY-MM-DDThh:mm:ssZ.
claimedAtTime
The RFC-3339 timestamp at which the device was claimed, formatted as YYYY-MM-DDThh:mm:ssZ. Shows null if the device has not been claimed. Devices must be claimed before pairing.
vehicleVehicle
The vehicle, if any, with which the device is paired.
beneficiaryAddress!
A 20-byte Ethereum address registered on the blockchain as the beneficiary of this device. This is defined as who receives any associated rewards. Defaults to the owner.
nameString!
A 3-word-representation of the device, generated randomly.
imageString!
The image URL of the device.
earningsAftermarketDeviceEarning
The earnings attached to the aftermarket device.

AftermarketDevices

Get a list of minted aftermarket devices ordered by tokenId in descending order.

Arguments

firstInt
Returns the first records given the argument provided.
lastInt
Returns the last records given the argument provided.
afterString
Used for pagination, returns records after given the identifier provided.
beforeString
Used for pagination, returns records before given the identifier provided.
filterBy: beneficiaryAddress
0x address of the beneficiary user.
filterBy: ownerAddress
0x address of the aftermarket device owner.
filterBy: manufacturerIdInt
The identifier for the manufacturer of the aftermarket device.
{
aftermarketDevices(
first: 10
filterBy: { owner: "0x8E075A4696E84d5e69CA04F657Fac205FC9Fe31E" }
) {
totalCount
}
}

Hierarchy

totalCountInt!
The total number of aftermarket devices available.
pageInfoPageInfo!
Information about the current page of results for pagination.
edges[AftermarketDeviceEdge!]!
A list of edges containing AftermarketDevice nodes.

DCN

The DCN resource is the DIMO Canonical Name registered to a given vehicle on the DIMO network. This refers to viewing a particular DCN.

Arguments

nodeBytes
nameString
{
dcn(
by: {
name: "slickdriver.dimo"
node: "0x"
}
) {
node
tokenId
owner
mintedAt
name
}
}

Hierarchy

nodeBytes!
The namehash of the domain.
tokenIdInt!
The ERC-721 token identifier for the domain.
nameString!
Human readable name, if any, for the domain; for example, reddy.dimo.
ownerAddress!
A 20-byte Ethereum address registered on the blockchain for the owner of the DCN, encoded as a checksummed hex string with 0x prefix.
mintedAtTime!
The RFC-3339 timestamp at which the DCN was minted, formatted as YYYY-MM-DDThh:mm:ssZ.
expiredAtTime!
he RFC-3339 timestamp at which the DCN was minted, formatted as YYYY-MM-DDThh:mm:ssZ.
vehicleVehicle
The vehicle, if any, to which the domain is attached.

DCNConnection

The DCNConnection query returns a paginated list of minted DIMO Canonical Names ordered by mintedAt timestamps in descending order.

Arguments

firstInt
Returns the first records given the argument provided.
lastInt
Returns the last records given the argument provided.
afterString
Used for pagination, returns records after given the identifier provided.
beforeString
Used for pagination, returns records before given the identifier provided.
filterBy: ownerAddress
0x address of the DCN owner.
{
dcns(
first: 10
filterBy: { owner: "0x8E075A4696E84d5e69CA04F657Fac205FC9Fe31E" }
) {
nodes {
node
owner
}
}
}

DeveloperLicense

DeveloperLicense is the resource that was issued to a developer building on DIMO.

query SpecificDevLicense($Address: Address!) {
developerLicense(by: { clientId: $Address }) {
tokenId
owner
alias
clientId
mintedAt
redirectURIs(first: 100) {
nodes {
uri
enabledAt
}
}
}
}

Hierarchy

tokenIdInt!
The token id of the license as an NFT.
ownerAddress!
The owner of the license. A single owner can own multiple licenses.
clientIdAddress!
Serves as the client id for OAuth as well as the address of the associated contract.
aliasString
A human-readable alias for this license. Unique among all licenses if present.
mintedAtTime!
The block timestamp for the transaction that minted this license.
signersSignerConnection!
The public signer address for this license.
redirectURIsRedirectURIConnection!
The registered redirect URIs for this license.

DeviceDefinition

Device Definition is the resource definition for device(s).


<ParametersBlock
title="Hierarchy"
parameters={[
{
name: "deviceDefinitionId",
type: "String!",
description: "The identifier for this device definition."
},
{
name: "legacyId",
type: "String!",
description: "The legacy identifier for this device definition. Does not apply to newer device definitions."
},
{
name: "manufacturer",
type: "Manufacturer",
description: "Manufacturer for this device definition."
},
{
name: "model",
type: "String",
description: "Model for this device definition."
},
{
name: "year",
type: "Int!",
description: "Year for this device definition."
},
{
name: "deviceType",
type: "String!",
description: "Device type for this device definition."
},
{
name: "imageURI",
type: "String",
description: "Image URI for this device definition."
},
{
name: "attributes",
type: "[DeviceDefinitionAttribute!]!",
description: "Device attributes for this device definition."
}
]}
/>

### earning

The Earning resource represents earnings data for devices or entities in the DIMO network. This refers to viewing earning details and rewards.

<ParametersBlock
title="Arguments"
parameters={[
{
name: "id",
type: "ID",
},
{
name: "week",
type: "Int",
},
]}
/>

```graphql
{
earning(by: { id: "1", week: 52 }) {
id
week
totalTokens
device {
id
tokenId
}
beneficiary
claimedAt
}
}

Hierarchy

idID!
A unique global identifier for the earning record.
weekInt!
The week number for which this earning was calculated.
totalTokensFloat!
The total number of tokens earned in this period.
deviceDevice
The device associated with this earning.
beneficiaryAddress!
The address that receives the earnings.
claimedAtTime
The RFC-3339 timestamp when the earning was claimed, formatted as YYYY-MM-DDThh:mm:ssZ. Shows null if not yet claimed.

Earning

Earning is the resource that was rewarded to a DIMO-connected vehicle.

Hierarchy

weekInt!
The week number that the reward was issued.
beneficiaryAddress!
The 0x address of beneficiary that received rewards.
connectionStreakInt!
The number of consecutive period of which the vehicle was connected.
streakTokensBigDecimal!
The number of tokens earned for the connected period.
aftermarketDeviceAftermarketDevice
The AftermarketDevice that is connected to the vehicle.
aftermarketDeviceTokensBigDecimal!
The number of tokens earned for the AftermarketDevice.
syntheticDeviceSyntheticDevice
The SyntheticDevice that is connected to the vehicle.
syntheticDeviceTokensBigDecimal!
The number of tokens earned for the SyntheticDevice.
vehicleVehicle
The vehicle that the reward is assigned to.
sentAtTime!
When the tokens were earned.

EarningsConnection

Get a list of DIMO Earnings in reverse chronological order.

Arguments

firstInt
Returns the first records given the argument provided.
lastString
Returns the last records given the argument provided.
afterInt
Used for pagination, returns records after the given identifier.
beforeString
Used for pagination, returns records before the given identifier.

Hierarchy

totalTokensInt!
Total DIMO tokens distributed to the vehicle.
edges[EarningsEdge!]!
nodes[Earnings!]!

Manufacturer

The Manufacturer resource is a registered manufacturer on the DIMO network. This refers to viewing a particular manufacturer.

Arguments

nameString
tokenIdInt
{
manufacturer(by: { name: "Tesla", tokenId: 123 }) {
id
tokenId
name
owner
mintedAt
aftermarketDevices {
totalCount
edges {
node {
id
tokenId
}
}
}
}
}

Hierarchy

idID!
An opaque global identifier for the manufacturer.
tokenIdInt!
The ERC-721 token identifier for the manufacturer.
nameString!
The name of the manufacturer.
ownerAddress!
A 20-byte Ethereum address registered on the blockchain, encoded as a checksummed hex string with 0x prefix.
mintedAtTime!
The RFC-3339 timestamp at which the manufacturer was minted, formatted as YYYY-MM-DDThh:mm:ssZ.
aftermarketDevicesAftermarketDeviceConnection!
A Relay-style connection listing of aftermarket devices associated with the manufacturer.

Sacd

The SACD resource is related to the permissions attached to the vehicle with regards to the permissions contract. For more details on SACD, please visit the permissions-contract-sacd section.

Hierarchy

granteeAddress!
Recipient of SACD permission grant.
permissionsString!
Hex string of permissions, see permissions table for more details.
sourceString!
Permission source.
createdAtTime!
The block timestamp at which this permission was set.
expiresAtTime!
The block timestamp at which the permission expires.

SyntheticDevice

The SyntheticDevice resource is a software connection established to connect the vehicle to the DIMO network. Despite the lack of an actual device, we abstracted this software-connected concept to the term synthetic. This refers to viewing a particular API connection to a vehicle.

Hierarchy

tokenIdInt!
The ERC-721 token identifier for the device.
integrationIdInt!
Refers to the types of integration.
addressAddress!
A 20-byte Ethereum address registered on the blockchain for the device, encoded as a checksummed hex string with 0x prefix.
mintedAtTime!
The RFC-3339 timestamp at which the device was minted, formatted as YYYY-MM-DDThh:mm:ssZ.

UserRewards

User Reward is the resource that was rewarded to a given user.

Arguments

userAddress!
The user where rewards were distributed to, this is the 0x address where DIMO tokens were sent to.

Hierarchy

totalTokensBigDecimal!
The total number of DIMO tokens distributed to the given user.
historyEarningsConnection!
The history of earnings for the given user.

Vehicle

The vehicle in DIMO is the moving object that was registered. This refers to viewing a particular vehicle.

Arguments

tokenIdInt
{
vehicle(tokenId: 123) {
id
name
}
}

Hierarchy

idID!
A unique global identifier for the vehicle.
tokenIdInt!
The ERC-721 token identifier for the vehicle.
manufacturerManufacturer
The manufacturer of the vehicle.
definitionDefinition
The device definition for this vehicle, including make, model, and year among other things.
imageString!
The image URL of the vehicle.
ownerAddress!
A 20-byte Ethereum address registered on the blockchain for the vehicle, encoded as a checksummed hex string with 0x prefix.
mintedAtTime!
The RFC-3339 timestamp at which the vehicle was minted, formatted as YYYY-MM-DDThh:mm:ssZ.
aftermarketDeviceAftermarketDevice
The paired aftermarket device, if any.
privilegesPrivilegesConnection!
A Relay-style connection listing of active privilege grants on this vehicle.
syntheticDeviceSyntheticDevice
The paired synthetic device, if any.
dcnDCN
DIMO Canonical Name. Human-readable labels for this vehicle, if any.
earningsVehicleEarnings
Reward earnings for the vehicle.
nameString!
A 3-word-representation of the vehicle, generated randomly.

VehicleConnection

Get a list of minted vehicles ordered by tokenId in descending order.

Arguments

firstInt
Returns the first records given the argument provided.
lastInt
Returns the last records given the argument provided.
afterString
Used for pagination, returns records after the given identifier.
beforeString
Used for pagination, returns records before the given identifier.
filterBy.privilegedAddress
0x address of the privileged user.
filterBy.ownerAddress
0x address of the vehicle owner.
{
vehicles(
first: 100
after: "NDIyMTg="
filterBy: { owner: "0x84B0EEeCD3bd243603df244D33587FF23c78D6B0" }
) {
nodes {
id
tokenId
owner
mintedAt
name
image
}
pageInfo {
startCursor
endCursor
hasPreviousPage
hasNextPage
}
}
}

VehicleEarnings

The VehicleEarnings resource is a collection of DIMO token earnings on a vehicle object.

Hierarchy

totalTokensBigDecimal!
The total amount of DIMO tokens distributed to a vehicle.
historyEarningsConnection!
A Relay-style connection listing earnings history on a vehicle.