GET /dids
Retrieve a DID Document by its DID.
{{baseUrl}}/dids
Headers
Header | Type | Description |
---|---|---|
x-api-key | string | The API key required for authentication. |
did | string | The unique DID identifier, formatted as did:method:id . |
did: did:earthid:testnet:HwetGVKwLAu12HRZaCKcMxdijsjxdSc7Lw1KSzC6FYDR:0.0.5021630
Click Send
and wait for the response.
Response (Success - 200)
Parameter | Type | Description |
---|---|---|
_id | string | The internal ID of the document in the database. |
id | string | The DID identifier. |
topicId | string | The Hedera network topic ID associated with the DID for credentials. |
templateTopicId | string | The Hedera network topic ID associated with the DID for vc-templates. |
publicKey | array | An array of public keys associated with the DID. |
publicKey.id | string | The identifier of the public key. |
publicKey.type | string | The type of the public key (e.g., Secp256k1VerificationKey2018 ). |
publicKeyHex | string | The public key in hexadecimal format. |
publicKey._id | string | The internal ID of the public key document in the database. |
authentication | array | An array of authentication methods associated with the DID (empty in this example). |
service | array | An array of services associated with the DID (empty in this example). |
created | string | The timestamp when the DID was created. |
updated | string | The timestamp when the DID was last updated. |
hederaFileId | string | The Hedera network file ID associated with the DID. |
__v | number | The version key, used by MongoDB for document versioning. |
Sample Response Body:
{
"_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
}
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" }