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
tokenId
Intaddress
Addressserial
String{
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
id
ID!tokenId
Int!manufacturer
Manufactureraddress
Address!owner
Address!serial
Stringimei
StringmintedAt
Time!claimedAt
Timevehicle
Vehiclebeneficiary
Address!name
String!image
String!earnings
AftermarketDeviceEarningAftermarketDevices
Get a list of minted aftermarket devices ordered by tokenId
in descending order.
Arguments
first
Intlast
Intafter
Stringbefore
StringfilterBy: beneficiary
AddressfilterBy: owner
AddressfilterBy: manufacturerId
Int{
aftermarketDevices(
first: 10
filterBy: { owner: "0x8E075A4696E84d5e69CA04F657Fac205FC9Fe31E" }
) {
totalCount
}
}
Hierarchy
totalCount
Int!pageInfo
PageInfo!edges
[AftermarketDeviceEdge!]!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
node
Bytesname
String{
dcn(
by: {
name: "slickdriver.dimo"
node: "0x"
}
) {
node
tokenId
owner
mintedAt
name
}
}
Hierarchy
node
Bytes!tokenId
Int!name
String!owner
Address!mintedAt
Time!expiredAt
Time!vehicle
VehicleDCNConnection
The DCNConnection query returns a paginated list of minted DIMO Canonical Names ordered by mintedAt
timestamps in descending order.
Arguments
first
Intlast
Intafter
Stringbefore
StringfilterBy: owner
Address{
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
tokenId
Int!owner
Address!clientId
Address!alias
StringmintedAt
Time!signers
SignerConnection!redirectURIs
RedirectURIConnection!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
id
ID!week
Int!totalTokens
Float!device
Devicebeneficiary
Address!claimedAt
TimeEarning
Earning is the resource that was rewarded to a DIMO-connected vehicle.
Hierarchy
week
Int!beneficiary
Address!connectionStreak
Int!streakTokens
BigDecimal!aftermarketDevice
AftermarketDeviceaftermarketDeviceTokens
BigDecimal!syntheticDevice
SyntheticDevicesyntheticDeviceTokens
BigDecimal!vehicle
VehiclesentAt
Time!EarningsConnection
Get a list of DIMO Earnings in reverse chronological order.
Arguments
first
Intlast
Stringafter
Intbefore
StringHierarchy
totalTokens
Int!edges
[EarningsEdge!]!nodes
[Earnings!]!Manufacturer
The Manufacturer resource is a registered manufacturer on the DIMO network. This refers to viewing a particular manufacturer.
Arguments
name
StringtokenId
Int{
manufacturer(by: { name: "Tesla", tokenId: 123 }) {
id
tokenId
name
owner
mintedAt
aftermarketDevices {
totalCount
edges {
node {
id
tokenId
}
}
}
}
}
Hierarchy
id
ID!tokenId
Int!name
String!owner
Address!mintedAt
Time!aftermarketDevices
AftermarketDeviceConnection!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
grantee
Address!permissions
String!source
String!createdAt
Time!expiresAt
Time!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
tokenId
Int!integrationId
Int!address
Address!mintedAt
Time!UserRewards
User Reward is the resource that was rewarded to a given user.
Arguments
user
Address!Hierarchy
totalTokens
BigDecimal!history
EarningsConnection!Vehicle
The vehicle in DIMO is the moving object that was registered. This refers to viewing a particular vehicle.
Arguments
tokenId
Int{
vehicle(tokenId: 123) {
id
name
}
}
Hierarchy
id
ID!tokenId
Int!manufacturer
Manufacturerdefinition
Definitionimage
String!owner
Address!mintedAt
Time!aftermarketDevice
AftermarketDeviceprivileges
PrivilegesConnection!syntheticDevice
SyntheticDevicedcn
DCNearnings
VehicleEarningsname
String!VehicleConnection
Get a list of minted vehicles ordered by tokenId
in descending order.
Arguments
first
Intlast
Intafter
Stringbefore
StringfilterBy.privileged
AddressfilterBy.owner
Address{
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
totalTokens
BigDecimal!history
EarningsConnection!