Skip to main content

GET /dids

Retrieve a DID Document by its DID.

{{baseUrl}}/dids

Headers

HeaderTypeDescription
x-api-keystringThe API key required for authentication.
didstringThe 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)

ParameterTypeDescription
_idstringThe internal ID of the document in the database.
idstringThe DID identifier.
topicIdstringThe Hedera network topic ID associated with the DID for credentials.
templateTopicIdstringThe Hedera network topic ID associated with the DID for vc-templates.
publicKeyarrayAn array of public keys associated with the DID.
publicKey.idstringThe identifier of the public key.
publicKey.typestringThe type of the public key (e.g., Secp256k1VerificationKey2018).
publicKeyHexstringThe public key in hexadecimal format.
publicKey._idstringThe internal ID of the public key document in the database.
authenticationarrayAn array of authentication methods associated with the DID (empty in this example).
servicearrayAn array of services associated with the DID (empty in this example).
createdstringThe timestamp when the DID was created.
updatedstringThe timestamp when the DID was last updated.
hederaFileIdstringThe Hedera network file ID associated with the DID.
__vnumberThe 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)

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" }