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
tokenIdIntaddressAddressserialString{
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!tokenIdInt!manufacturerManufactureraddressAddress!ownerAddress!serialStringimeiStringmintedAtTime!claimedAtTimevehicleVehiclebeneficiaryAddress!nameString!imageString!earningsAftermarketDeviceEarningAftermarketDevices
Get a list of minted aftermarket devices ordered by tokenId in descending order.
Arguments
firstIntlastIntafterStringbeforeStringfilterBy: beneficiaryAddressfilterBy: ownerAddressfilterBy: manufacturerIdInt{
aftermarketDevices(
first: 10
filterBy: { owner: "0x8E075A4696E84d5e69CA04F657Fac205FC9Fe31E" }
) {
totalCount
}
}
Hierarchy
totalCountInt!pageInfoPageInfo!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
nodeBytesnameString{
dcn(
by: {
name: "slickdriver.dimo"
node: "0x"
}
) {
node
tokenId
owner
mintedAt
name
}
}
Hierarchy
nodeBytes!tokenIdInt!nameString!ownerAddress!mintedAtTime!expiredAtTime!vehicleVehicleDCNConnection
The DCNConnection query returns a paginated list of minted DIMO Canonical Names ordered by mintedAt timestamps in descending order.
Arguments
firstIntlastIntafterStringbeforeStringfilterBy: ownerAddress{
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!ownerAddress!clientIdAddress!aliasStringmintedAtTime!signersSignerConnection!redirectURIsRedirectURIConnection!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!weekInt!totalTokensFloat!deviceDevicebeneficiaryAddress!claimedAtTimeEarning
Earning is the resource that was rewarded to a DIMO-connected vehicle.
Hierarchy
weekInt!beneficiaryAddress!connectionStreakInt!streakTokensBigDecimal!aftermarketDeviceAftermarketDeviceaftermarketDeviceTokensBigDecimal!syntheticDeviceSyntheticDevicesyntheticDeviceTokensBigDecimal!vehicleVehiclesentAtTime!EarningsConnection
Get a list of DIMO Earnings in reverse chronological order.
Arguments
firstIntlastStringafterIntbeforeStringHierarchy
totalTokensInt!edges[EarningsEdge!]!nodes[Earnings!]!Manufacturer
The Manufacturer resource is a registered manufacturer on the DIMO network. This refers to viewing a particular manufacturer.
Arguments
nameStringtokenIdInt{
manufacturer(by: { name: "Tesla", tokenId: 123 }) {
id
tokenId
name
owner
mintedAt
aftermarketDevices {
totalCount
edges {
node {
id
tokenId
}
}
}
}
}
Hierarchy
idID!tokenIdInt!nameString!ownerAddress!mintedAtTime!aftermarketDevicesAftermarketDeviceConnection!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!permissionsString!sourceString!createdAtTime!expiresAtTime!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!integrationIdInt!addressAddress!mintedAtTime!UserRewards
User Reward is the resource that was rewarded to a given user.
Arguments
userAddress!Hierarchy
totalTokensBigDecimal!historyEarningsConnection!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!tokenIdInt!manufacturerManufacturerdefinitionDefinitionimageString!ownerAddress!mintedAtTime!aftermarketDeviceAftermarketDeviceprivilegesPrivilegesConnection!syntheticDeviceSyntheticDevicedcnDCNearningsVehicleEarningsnameString!VehicleConnection
Get a list of minted vehicles ordered by tokenId in descending order.
Arguments
firstIntlastIntafterStringbeforeStringfilterBy.privilegedAddressfilterBy.ownerAddress{
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!historyEarningsConnection!