# VOL (On-Line Verifier) API

OpenAPI specification generated from the provided VOL documentation.
**Authentication**
All endpoints are protected by token-based authentication via the `Authorization` header:
`Authorization: token <token-value>`.
**Base URL**
All paths below are relative to:
`https://{address}/api`
**Caching**
Uploaded documents are kept in cache for a configurable time window. After expiry, the document
is deleted and must be uploaded again.

Version: 1.0

## Servers

```
https://{address}/api
```

Variables:
- `address`: FQDN (or host:port) where VOL is deployed
  Default: "example.com"

## Security

### AuthToken

Token-based authentication header.
Example:
`Authorization: token 0540c6085962614ab245e07963d9aa68`

Type: apiKey
In: header
Name: Authorization

## Download OpenAPI description

 - [VOL (On-Line Verifier) API](https://docs.namirial.app/_bundle/products/pki-on-prem/VOL/openapi.yaml)

## Documents

 - [POST /documents/](https://docs.namirial.app/products/pki-on-prem/vol/openapi/documents/uploaddocument.md): Upload a signed document to the system in order to run subsequent operations (signature report, verification, content extraction, etc.). You can upload: * **a single signed file** (embedded signature)
 - [GET /documents/{document-id}/](https://docs.namirial.app/products/pki-on-prem/vol/openapi/documents/getdocument.md): Retrieve the originally uploaded document content. The returned content is **exactly** the same as the originally uploaded file. Note: On success, the server response does **not** include a filename h
 - [GET /documents/{document-id}/report](https://docs.namirial.app/products/pki-on-prem/vol/openapi/documents/getsignaturereport.md): Get the signature structure affixed to the uploaded document (**CAdES only**) as a JSON report. The returned object includes: * `code`: HTTP status as string (e.g. `"200 OK"`) * `result.report`: the s
 - [GET /documents/{document-id}/content](https://docs.namirial.app/products/pki-on-prem/vol/openapi/documents/getdocumentcontent.md): Return the extracted (unsigned) content of a previously uploaded document. The returned bytes depend on the signature type: * For **CAdES/XAdES**: returns the original document *without* the signature
 - [GET /documents/{document-id}/verify/report](https://docs.namirial.app/products/pki-on-prem/vol/openapi/documents/verifydocument.md): Verify a previously uploaded document and return a verification report. The output depends on query parameters: * `type=json` and `template=report` → JSON report * `type=rml` and `template=report` → P
## Administration

 - [POST /admin/certificates/](https://docs.namirial.app/products/pki-on-prem/vol/openapi/administration/addcacertificate.md): Upload (add) a Certification Authority (CA) certificate to the system. This operation is intended to add a CA that is not present among the trusted ones already configured. Requires a token with **adm
 - [GET /admin/certificates/](https://docs.namirial.app/products/pki-on-prem/vol/openapi/administration/listcacertificates.md): Retrieve the CA certificates stored on the system as a paginated JSON report. Requires a token with **administrator** privileges. Filtering parameters are modeled as query parameters (the documentatio
