The caller's key wraps of an encrypted version (tenant:dms:read)
GET /api/dms/v1/documents/{id}/encryption
Module: DMS · operationId: getDocumentEncryption · Tag: Encryption · Auth: access token (Authorization: Bearer <accessToken>)
400 for unencrypted documents, 403 when the caller holds no wrap (directly or through a key group). Callers with tenant:dms:admin also see the recovery wrap.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | string (uuid) | yes | |
version |
query | integer | Version number; default the current version |
Responses
- 200 Envelope (
application/json) - 400 Error (
application/json) - 403 Error (
application/json) - 404 Error (
application/json)
Fields of the 200 answer:
alg(string, required): Content encryption algorithmdocumentId(string (uuid), required): Document idgroupKeys(array of GroupKeyShare, required): The caller's shares of the groups the document is wrapped foralgorithm(string): Key agreement algorithmephemeralPublicKey(string): Base64 SPKI P-256 ephemeral public key of the wrapgroupId(string (uuid)): Key group idgroupName(string): Key group namepublicKey(string): Base64 SPKI public key of the groupwrappedGroupPrivateKey(string): The group private key wrapped for the caller (base64)
iv(string, required): Initialization vector of the content encryption (base64)versionNumber(integer, required): Version the wraps belong towraps(array of KeyWrap, required): The document key wrapped for the caller and its groupsephemeralPublicKey(string, required): Base64 SPKI P-256 public keyrecipientId(string, required): User id (e-mail), key group id or recovery key idrecipientType(string, required): Who the wrap is for (one ofUSER,GROUP,RECOVERY)wrappedDek(string, required): The document key wrapped with ECDH + AES-GCM (base64)
encryptedMetadata(string): Client-encrypted metadata, if any
Example 200 answer:
{
"alg": "AES-256-GCM",
"documentId": "9d1f3b5d-7e9a-4c1d-8f3b-1d3f5b7d9e1a",
"groupKeys": [
{
"algorithm": "ECDH-P256",
"ephemeralPublicKey": "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEexampleEphemeralKeyChristina",
"groupId": "5d7f9b1d-3e5a-4c7b-9d1f-7b9d1f3a5c7e",
"groupName": "Personalabteilung",
"publicKey": "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEexamplePublicKeyOfTheGroupP256xyz",
"wrappedGroupPrivateKey": "ZXhhbXBsZS13cmFwcGVkLWdyb3VwLWtleS1mb3ItY2hyaXN0aW5h"
}
],
"iv": "ZXhhbXBsZS1pdi0xMg==",
"versionNumber": 1,
"wraps": [
{
"ephemeralPublicKey": "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEexampleEphemeralKeyDocument",
"recipientId": "5d7f9b1d-3e5a-4c7b-9d1f-7b9d1f3a5c7e",
"recipientType": "GROUP",
"wrappedDek": "ZXhhbXBsZS13cmFwcGVkLWRlay1mb3ItZ3JvdXA"
}
]
}
Example request
curl -X GET 'https://api.mbcom.cloud/api/dms/v1/documents/3f2b8c1e-7d4a-4e9b-9c2a-5b1d6e8f0a12/encryption' \
-H "Authorization: Bearer $ACCESS_TOKEN"