Skip to main content

GET /resolve/:did

Resolve a DID Document by its DID.

{{baseUrl}}/resolve/:did

Headers

HeaderTypeDescription
x-api-keystringThe API key required for authentication.

Path Parameters

ParameterTypeDescription
didstringThe Decentralized Identifier (DID) to retrieve details for.
did: did:earthid:testnet:HwetGVKwLAu12HRZaCKcMxdijsjxdSc7Lw1KSzC6FYDR:0.0.5021630

Click Send and wait for the response.

Response (Success - 200)

ParameterTypeDescription
didResolutionMetadataobjectMetadata related to the DID resolution process.
didResolutionMetadata.contentTypestringThe content type of the resolved DID document.
didDocumentobjectThe resolved DID document.
didDocument._idstringThe internal ID of the document in the database.
didDocument.idstringThe DID identifier.
didDocument.topicIdstringThe Hedera network topic ID associated with the DID.
didDocument.templateTopicIdstringThe Hedera network template topic ID associated with the DID.
didDocument.publicKeyarrayAn array of public keys associated with the DID.
didDocument.publicKey.idstringThe identifier of the public key.
didDocument.publicKey.typestringThe type of the public key (e.g., Secp256k1VerificationKey2018).
didDocument.publicKeyHexstringThe public key in hexadecimal format.
didDocument.publicKey._idstringThe internal ID of the public key document in the database.
didDocument.authenticationarrayAn array of authentication methods associated with the DID (empty in this example).
didDocument.servicearrayAn array of services associated with the DID (empty in this example).
didDocument.createdstringThe timestamp when the DID was created.
didDocument.updatedstringThe timestamp when the DID was last updated.
didDocument.hederaFileIdstringThe Hedera network file ID associated with the DID.
didDocument.__vnumberThe version key, used by MongoDB for document versioning.
didDocumentMetadataobjectMetadata related to the resolved DID document (empty in this example).

Sample Response Body:

{
"didResolutionMetadata": {
"contentType": "application/did+ld+json"
},
"didDocument": {
"_id": "6718903e3d7612bbcee84c4e",
"id": "did:earthid:testnet:HwetGVKwLAu12HRZaCKcMxdijsjxdSc7Lw1KSzC6FYDR:0.0.5021630",
"topicId": "0.0.5021628",
"templateTopicId": "0.0.5021629",
"publicKey": [
{
"id": "did:earthid:testnet:HwetGVKwLAu12HRZaCKcMxdijsjxdSc7Lw1KSzC6FYDR#keys-1",
"type": "Secp256k1VerificationKey2018",
"publicKeyHex": "04dc13d8bb3a70e48972c4d49a6789195df9f9e86524e45de1ebfac19ef3139fadbcd6ff950c1fe66407c7341560115525e469f092cc96435b036b44a78d756ba6",
"_id": "6718903e3d7612bbcee84c4f"
}
],
"authentication": [],
"service": [],
"created": "2024-10-23T05:57:18.902Z",
"updated": "2024-10-23T05:57:18.902Z",
"hederaFileId": "0.0.5021630",
"__v": 0
},
"didDocumentMetadata": {}
}

Response (DID Not Found - 404)

ParameterTypeDescription
errorstringDescribes the error that occurred.

Sample Response Body:

{ "error": "DID not found" }

Response (Server Error - 500)

ParameterTypeDescription
errorstringDescribes the error that occurred.

Sample Response Body:

{ "error": "Failed to retrieve DID" }