GET /resolve/:did
Resolve a DID Document by its DID.
{{baseUrl}}/resolve/:did
Headers
Header | Type | Description |
---|---|---|
x-api-key | string | The API key required for authentication. |
Path Parameters
Parameter | Type | Description |
---|---|---|
did | string | The 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)
Parameter | Type | Description |
---|---|---|
didResolutionMetadata | object | Metadata related to the DID resolution process. |
didResolutionMetadata.contentType | string | The content type of the resolved DID document. |
didDocument | object | The resolved DID document. |
didDocument._id | string | The internal ID of the document in the database. |
didDocument.id | string | The DID identifier. |
didDocument.topicId | string | The Hedera network topic ID associated with the DID. |
didDocument.templateTopicId | string | The Hedera network template topic ID associated with the DID. |
didDocument.publicKey | array | An array of public keys associated with the DID. |
didDocument.publicKey.id | string | The identifier of the public key. |
didDocument.publicKey.type | string | The type of the public key (e.g., Secp256k1VerificationKey2018 ). |
didDocument.publicKeyHex | string | The public key in hexadecimal format. |
didDocument.publicKey._id | string | The internal ID of the public key document in the database. |
didDocument.authentication | array | An array of authentication methods associated with the DID (empty in this example). |
didDocument.service | array | An array of services associated with the DID (empty in this example). |
didDocument.created | string | The timestamp when the DID was created. |
didDocument.updated | string | The timestamp when the DID was last updated. |
didDocument.hederaFileId | string | The Hedera network file ID associated with the DID. |
didDocument.__v | number | The version key, used by MongoDB for document versioning. |
didDocumentMetadata | object | Metadata 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)
Parameter | Type | Description |
---|---|---|
error | string | Describes the error that occurred. |
Sample Response Body:
{ "error": "DID not found" }
Response (Server Error - 500)
Parameter | Type | Description |
---|---|---|
error | string | Describes the error that occurred. |
Sample Response Body:
{ "error": "Failed to retrieve DID" }