Appearance
GraphQL Interface
Next to the Version Service API, we offer a GraphQL API that enables fine-tuned querying for the data relating to DID Records.
Considering the large potential overhead that comes with retrieving the data from the Version Service, this API offers the possibility to define precisely the data you want to fetch.
The extensive list of arguments allows for detailed filtering, and choosing a subset of return type fields makes it possible to focus only on what we're interested in.
For example, to retrieve the list of DID Records (here limited to two DID Records) that match the arguments:
Method | Service Endpoint | Limit |
---|---|---|
cheqd | "https://dwn.danubetech.com/" | 2 |
but only show the following fields: did
, service type
, service endpoint
, and version time
, we could issue the following query operation:
graphql
query ExampleQuery($method: String, $limit: Int, $serviceEndpoint: String) {
didList(method: $method, limit: $limit, serviceEndpoint: $serviceEndpoint) {
did
didService {
type
serviceEndpoint
}
didVersion {
versionTime
}
}
}
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
with the GraphQL UI Variables field like this:
json
{
"method": "cheqd",
"serviceEndpoint": "https://dwn.danubetech.com/",
"limit": 2
}
1
2
3
4
5
2
3
4
5
and would get a response similar to this:
json
{
"data": {
"didList": [
{
"did": "did:cheqd:testnet:057b19d0-0769-4df9-9343-aebacfaa1951",
"didService": [
{
"type": "DecentralizedWebNode",
"serviceEndpoint": "\"https://dwn.danubetech.com/\""
}
],
"didVersion": {
"versionTime": "2023-05-14T18:48:24.205Z"
}
},
{
"did": "did:cheqd:testnet:039d475e-f4a1-47b8-a3a0-823e2708413f",
"didService": [
{
"type": "DecentralizedWebNode",
"serviceEndpoint": "\"https://dwn.danubetech.com/\""
}
],
"didVersion": {
"versionTime": "2023-05-16T13:32:49.750Z"
}
}
]
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
TIP
You can add arguments to the query by utilizing the "Variables" tab in the GraphQL UI (https://graphql.godiddy.com/), or by providing them as a part of the curl
command (see examples).
WARNING
To use this query field (didList
), a valid API key is necessary. For details, please visit godiddy.com/pricing.
Query Fields
didList
didCount
dailyTransactionCount
duplicateKeys
operationCount
verificationMethodVariety
serviceTypeVariety
Jump to the list of Types.
didList
Return type: [DidRecord!]
This query field, powered by the extensive argument list, can filter and return a list of DID Records, that can be precisely trimmed by selecting the fields of the return type to match the expected view of the data. To query this field, an API key is necessary.
Argument | Type | Description |
---|---|---|
limit | Int | Take only the first n results. (Default limit = 10, max limit = 20) |
offset | Int | Skip the first n results. |
did | String | Query the DID Records for the given DID. |
method | String | Query the DID Records for the given method. |
network | String | Query the DID Records for the given network. |
alsoKnownAs | [String!] | Query the DID Records where at least one alsoKnownAs matches any of the given URIs. |
controller | String | Query the DID Records with a given controller. |
verificationMethodType | String | Query the DID Records with the given verification type. |
verificationMethodUrl | String | Query the DID Records with the given verification method URL. |
operationType | String | Query for the DID Records with an operation type of either create or update/deactivate . |
serviceEndpoint | String | Query for the DID Records with the given service endpoint. |
serviceType | String | Query for the DID Records with the given service type. |
serviceUrl | String | Query for the DID Records with the given service URL. |
versionId | String | Query for the DID Records with the given version ID. |
versionTime | String | Query the DID Records with the given version time. |
versionTimeFrom | String | Query the DID Records with the version time after, or equal to versionTimeFrom . |
versionTimeTo | String | Query the DID Records with the version time before, or equal to versionTimeTo . |
anyError | Boolean | Query for the DID Records that have an error. |
dereferencingError | Boolean | Query for the DID Records that have a dereferencing error. |
verificationMethodError | Boolean | Query for the DID Records that have a verification method error. |
didDocumentError | Boolean | Query for the DID Records that have a DID Document error. |
didSyntaxError | Boolean | Query for the DID Records that have a syntax error. |
jsonLdError | Boolean | Query for the DID Records that have a JSON-LD error. |
versionTimeError | Boolean | Query for the DID Records that have a version time error. |
NOTE
Expected format for versionTime
, versionTimeFrom
, and versionTimeTo
is a date-time
string at UTC, compliant with the date-time
format outlined in section 5.6 of the RFC 3339 profile of the ISO 8601 standard for representation of dates and times using the Gregorian calendar.
Example query cURL
:
bash
curl --request POST \
--header 'content-type: application/json' \
--header 'Authorization: Bearer API_KEY' \
--url 'https://graphql.godiddy.com/' \
--data '{"query":"query DidList($method: String, $network: String, $anyError: Boolean) {\n didList(method: $method, network: $network, anyError: $anyError) {\n method\n did\n }\n}","variables":{"method":"mymethod","network":"mainnet","anyError":true}}'
1
2
3
4
5
2
3
4
5
Example query operation:
graphql
query DidList($method: String, $network: String, $anyError: Boolean) {
didList(method: $method, network: $network, anyError: $anyError) {
method
did
}
}
1
2
3
4
5
6
2
3
4
5
6
Example response:
json
{
"data": {
"didList": [
{
"method": "mymethod",
"did": "did:mymethod:mainnet:oiqpfnaoqei65746654"
},
{
"method": "mymethod",
"did": "did:mymethod:mainnet:lasjkdfhawu98468168"
},
...
]
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2
3
4
5
6
7
8
9
10
11
12
13
14
15
didCount
Return type: Int
This query field returns the count of all known DID Records filtered by choosing arguments from the extensive list.
Argument | Type | Description |
---|---|---|
limit | Int | Take only the first n results. |
offset | Int | Skip the first n results. |
did | String | Query the count of DID Records for the given DID. |
method | String | Query the count of DID Records for the given method. |
network | String | Query the count of DID Records for the given network. |
alsoKnownAs | [String!] | Query the count of DID Records where at least one alsoKnownAs matches any of the given URIs. |
controller | String | Query the count of DID Records with a given controller. |
verificationMethodType | String | Query the count of DID Records with the given verification type. |
verificationMethodUrl | String | Query the DID Records with the given verification method URL. |
operationType | String | Query for the count of DID Records with an operation type of either create or update/deactivate . |
serviceEndpoint | String | Query for the count of DID Records with the given service endpoint. |
serviceType | String | Query for the count of DID Records with the given service type. |
serviceUrl | String | Query for the count of DID Records with the given service URL. |
versionId | String | Query the count of DID Records with the given version ID. |
versionTime | String | Query the count of DID Records with the given version time. |
versionTimeFrom | String | Query the count of DID Records with the version time after, or equal to versionTimeFrom . |
versionTimeTo | String | Query the count of DID Records with the version time before, or equal to versionTimeTo . |
anyError | Boolean | Query for the count of DID Records that have an error. |
dereferencingError | Boolean | Query for the count of DID Records that have a dereferencing error. |
verificationMethodError | Boolean | Query for the count of DID Records that have a verification method error. |
didDocumentError | Boolean | Query for the count of DID Records that have a DID Document error. |
didSyntaxError | Boolean | Query for the count of DID Records that have a syntax error. |
jsonLdError | Boolean | Query for the count of DID Records that have a JSON-LD error. |
versionTimeError | Boolean | Query for the count of DID Records that have a version time error. |
NOTE
Expected format for versionTime
, versionTimeFrom
, and versionTimeTo
is a date-time
string at UTC, compliant with the date-time
format outlined in section 5.6 of the RFC 3339 profile of the ISO 8601 standard for representation of dates and times using the Gregorian calendar.
Example query cURL
:
bash
curl --request POST \
--header 'content-type: application/json' \
--url 'https://graphql.godiddy.com/' \
--data '{"query":"query Query($method: String, $network: String) {\n didCount(method: $method, network: $network)\n}","variables":{"method":"mymethod","network":"mainnet"}}'
1
2
3
4
2
3
4
Example query operation:
graphql
query DidCount($method: String, $network: String) {
didCount(method: $method, network: $network)
}
1
2
3
2
3
Example response:
json
{
"data": {
"didCount": 123456
}
}
1
2
3
4
5
2
3
4
5
dailyTransactionCount
Return type: [DailyTransactionCount!]!
A daily count of DID transactions per method and network. This query field is used by the stats.godiddy.com for various views of transaction counts over time. This query field does not accept arguments.
Example query cURL
:
bash
curl --request POST \
--header 'content-type: application/json' \
--url 'https://graphql.godiddy.com/' \
--data '{"query":"query Query {\n dailyTransactionCount {\n count\n method\n network\n network_type\n version_day\n version_month\n version_year\n }\n}"}'
1
2
3
4
2
3
4
Example query operation:
graphql
query dailyTransactionCount {
dailyTransactionCount {
count
method
network
network_type
version_day
version_month
version_year
}
}
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
Example response:
json
{
"data": {
"dailyTransactionCount": [
{
"count": 123,
"method": "mymethod",
"network": "mainnet",
"network_type": "mainnet",
"version_day": "1",
"version_month": "1",
"version_year": "2024"
},
...
]
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
duplicateKeys
Return type: [DuplicateKeys!]
Given a DID, this query field returns all other known DIDs which have the same public key(s). If you set the argument withVersions
to true
, the query will also return the different versions of the DID.
Argument | Type | Required | Default value |
---|---|---|---|
did | String | true | |
withVersions | Boolean | false | false |
Example query cURL
:
bash
curl --request POST \
--header 'content-type: application/json' \
--header 'Authorization: Bearer API_KEY' \
--url 'https://graphql.godiddy.com/' \
--data '{"query":"query DuplicateKeys($did: String!, $withVersions: Boolean) {\n duplicateKeys(did: $did, withVersions: $withVersions) {\n did\n url1\n url2\n versionId\n }\n}","variables":{"did":"did:mymethod:123456789abcdef","withVersions":true}}'
1
2
3
4
5
2
3
4
5
Example query operation:
graphql
query DuplicateKeys($did: String!, $withVersions: Boolean) {
duplicateKeys(did: $did, withVersions: $withVersions) {
did
url1
url2
versionId
}
}
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
Example response:
json
{
"data": {
"duplicateKeys": [
{
"did": "did:mymethod:123456789abcdef",
"url1": "did:mymethod:123456789abcdef#key-1",
"url2": "did:mymethod:123456789abcdef#key-2",
"versionId": "0x3qwertyuiop123456"
},
{
"did": "did:mymethod:123456789abcdef",
"url1": "did:mymethod:123456789abcdef#key-1",
"url2": "did:mymethod:123456789abcdef#key-2",
"versionId": "0x4asdfghjkl789456"
},
{
"did": "did:mymethod:123456789abcdef",
"url1": "did:mymethod:123456789abcdef#key-1",
"url2": "did:mymethod:123456789abcdef#key-2",
"versionId": "0x5zxcvbnm321654"
}
]
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
operationCount
Return type: [OperationCount!]!
This field returns the daily count of create
and update/deactivate
operations per method and network. It is one of the fields used by stats.godiddy.com.
Argument | Type | Required | Default value |
---|---|---|---|
method | String | true | |
network | String | true | |
since | String | false | 30 Days ago |
Example query cURL
:
bash
curl --request POST \
--header 'content-type: application/json' \
--url 'https://graphql.godiddy.com/' \
--data '{"query":"query OperationCount($method: String!, $network: String!) {\n operationCount(method: $method, network: $network) {\n operation_count\n operation_type\n }\n}","variables":{"method":"mymethod","network":"testnet"}}'
1
2
3
4
2
3
4
Example query operation:
graphql
query OperationCount($method: String!, $network: String!) {
operationCount(method: $method, network: $network) {
operation_count
operation_type
}
}
1
2
3
4
5
6
2
3
4
5
6
Example response:
json
{
"data": {
"operationCount": [
{
"operation_count": 22,
"operation_type": "create"
},
{
"operation_count": 9,
"operation_type": "update/deactivate"
},
...
]
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2
3
4
5
6
7
8
9
10
11
12
13
14
15
verificationMethodVariety
Return type: [VerificationMethodVariety!]!
This query field returns a view of used verification methods for each method and network. It is one of the fields used by stats.godiddy.com.
Argument | Type | Required |
---|---|---|
method | String | true |
network | String | true |
Example query cURL
:
bash
curl --request POST \
--header 'content-type: application/json' \
--url 'https://graphql.godiddy.com/' \
--data '{"query":"query VerificationMethodVariety($method: String!, $network: String!) {\n verificationMethodVariety(method: $method, network: $network) {\n count\n verification_type\n }\n}","variables":{"method":"mymethod","network":"testnet"}}'
1
2
3
4
2
3
4
Example query operation:
graphql
query VerificationMethodVariety($method: String!, $network: String!) {
verificationMethodVariety(method: $method, network: $network) {
count
verification_type
}
}
1
2
3
4
5
6
2
3
4
5
6
Example response:
json
{
"data": {
"verificationMethodVariety": [
{
"count": 123,
"verification_type": "Ed25519VerificationKey2018"
},
{
"count": 456,
"verification_type": "Ed25519VerificationKey2020"
},
{
"count": 789,
"verification_type": "JsonWebKey2020"
},
...
]
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
serviceTypeVariety
Return type: [ServiceTypeVariety!]!
This query field returns a view of service types for each method and network. It is one of the fields used by stats.godiddy.com.
Argument | Type | Required |
---|---|---|
method | String | true |
network | String | true |
Example query cURL
:
bash
curl --request POST \
--header 'content-type: application/json' \
--url 'https://graphql.godiddy.com/' \
--data '{"query":"query ServiceTypeVariety($method: String!, $network: String!) {\n serviceTypeVariety(method: $method, network: $network) {\n count\n service_type\n }\n}","variables":{"network":"mynetwork","method":"mymethod"}}'
1
2
3
4
2
3
4
Example query operation:
graphql
query ServiceTypeVariety($method: String!, $network: String!) {
serviceTypeVariety(method: $method, network: $network) {
service_type
count
}
}
1
2
3
4
5
6
2
3
4
5
6
Example response:
json
{
"data": {
"serviceTypeVariety": [
{
"service_type": "DecentralizedWebNode",
"count": 1
},
{
"service_type": "LinkedDomains",
"count": 15
},
...
]
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Types
DidRecord
Name | Type |
---|---|
did | String! |
didDocument | DidDocument |
didService | [DidService!] |
didVerificationMethod | [DidVerificationMethod!] |
didState | DidState |
didVersion | DidVersion |
error | DidError |
id | String! |
method | String! |
network | DidNetwork |
alsoKnownAs | [AlsoKnownAs!]! |
controller | [Controller!]! |
timestamp | DateTime! |
DuplicateKeys
Name | Type |
---|---|
did | String! |
thumbprint | String! |
url1 | String! |
url2 | String! |
versionId | String! |
OperationCount
Name | Type |
---|---|
operation_count | BigInt! |
operation_type | String |
version_day | String |
version_month | String |
version_year | String |
DailyTransactionCount
Name | Type |
---|---|
count | BigInt |
method | String |
network | String |
network_type | String |
version_day | String |
version_month | String |
version_year | String |
DidDocument
Name | Type |
---|---|
did | String |
documentContent | JSON! |
documentMetadata | JSON! |
DidService
Name | Type |
---|---|
serviceEndpoint | String |
type | String |
url | String |
DidVerificationMethod
Name | Type |
---|---|
ketType | String |
thumbprint | String |
type | String |
url | String |
DidState
Name | Type |
---|---|
did | String |
state | String |
stateMetadata | JSON |
stateTime | DateTime! |
DidVersion
Name | Type |
---|---|
did | String |
versionId | String |
versionMetadata | JSON |
versionTime | DateTime! |
DidError
Name | Type |
---|---|
dereferencingError | Boolean |
didDocumentError | Boolean |
didSyntaxError | Boolean |
error | Boolean |
jsonLdError | Boolean |
message | String |
verificationMethodError | Boolean |
versionTimeError | Boolean |
DidNetwork
Name | Type |
---|---|
network | String |
AlsoKnownAs
Name | Type |
---|---|
alsoKnownAs | String |
Controller
Name | Type |
---|---|
controller | String |
VerificationMethodVariety
Name | Type |
---|---|
verificatioin_type | String |
count | BigInt |
ServiceTypeVariety
Name | Type |
---|---|
service_type | String |
count | BigInt |
DateTime
A date-time
string at UTC, such as 1970-01-01T00:00:01.970Z
, compliant with the date-time
format outlined in section 5.6 of the RFC 3339 profile of the ISO 8601 standard for representation of dates and times using the Gregorian calendar.