Porpose of the "Add document digest" operation is to avoid file transfering (if there is extra security requirements) out of internal network.
Operation add signable file digest (HASH) and file name to the file processing session.
Only possible for signing ASICE (EDOC) document types.
1. The file digest and file name is attached to the file processing session;
2. The file description information is returned.
The Service provider's application sends the following GET request using TLS:
POST /api-storage/v1.0/{sessionId}/addDocumentDigest |
Property | Type | Usage | Description |
---|---|---|---|
sessionId | String (64) | Mandatory | File processing session identifier |
The request must contain an Authorization header with an OAuth Introspect access token obtained via a Service provider's credentials grant flow.
{ "files": [ { "name": {String}, "digest": {String} } ], "signatureIndex": {String} } |
Property | Type | Usage | Description |
---|---|---|---|
files | Array | Mandatory | File diggest and name array |
files.name | String | Mandatory | The name of the file (with extension) from which the diggest was calculated |
files.digest | String | Mandatory | Calculated file digest in Base64 encoding. See note below. |
signatureIndex | String | Optional | Signature sequence index, starting with "0", which means the first signature (XAdES signature file name signatures0.xml) If Proprty is not used, signature index will be "0".
Otherwise, service provider shall rename signature file before adding it to ASICE container. |
|
POST /api-storage/v1.0/77740b301f0880ef498cb1e474e8060b3e538cfeea8ebf508c2bad4b72b56a87/addDocumentDigest HTTP/1.1 Authorization: Bearer a477b3a3366768c07e4c458f518711b4b351e8d2c2f0f78a1524e4d3efd00603 Host: signapi-prep.eparaksts.lv { "files": [ { "name": "10-10.pdf", "digest": "u69UTpGwlSfNpIMYhXPIa612ELFu+Y8zWaVCApzlQdE=" } ], "signatureIndex": "0" } |
POST /api-storage/v1.0/77740b301f0880ef498cb1e474e8060b3e538cfeea8ebf508c2bad4b72b56a87/addDocumentDigest HTTP/1.1 Authorization: Bearer a477b3a3366768c07e4c458f518711b4b351e8d2c2f0f78a1524e4d3efd00603 Host: signapi-prep.eparaksts.lv { "files": [ { "name": "10-10.pdf", "digest": "u69UTpGwlSfNpIMYhXPIa612ELFu+Y8zWaVCApzlQdE=" }, { "name": "10-11.docx", "digest": "u69UTpGwlSfNpIMYhXPIa612ELFu+Y8zWaVCApzlQdB=" }, { "name": "10-12.pdf", "digest": "u69UTpGwlSfNpIMYhXPIa612ELFu+Y8zWaVCApzlQdC=" } ], "signatureIndex": "0" } |
JSON object:
{ "data": [ { "id": {String}, "name": {String}, "size": {Number} } ] } |
Property | Type | Description |
---|---|---|
data | Object | Data Object |
data.id | String | File Identifier (documentId) |
data.name | String | File name |
data.size | Integer | File size in bytes (allways will be "0" since file name and digest was added) |
{ "data": [ { "id": "6921c9e8afd22a9a391d5318e08da85d", "name": "10-10.pdf", "size": 0 } ] } |
{ "data": [ { "id": "6921c9e8afd22a9a391d5318e08da85d", "name": "10-10.pdf", "size": 0 }, { "id": "9f1702526028570f5f6c2813417797a0", "name": "10-11.docx", "size": 0 }, { "id": "5d05429bc930622ee008ed4ded1b2de1", "name": "10-12.pdf", "size": 0 } ] } |