You send your token with every call, and you can add a few headers to pick a tenant or to get more information back. These headers work the same way on every endpoint.
Request headers
|
Header |
Required |
What it does |
|---|---|---|
|
|
Yes |
Your access token, as |
|
|
No |
The tenant to work in. |
|
|
No |
Deprecated: use |
|
|
No |
Extra information to add to the packages in the response, such as their metadata. |
|
|
With a body |
The format of the request body. For a JSON body, send |
|
|
No |
The format that you want back. Most endpoints return |
tenant
You only need the tenant header if your client can work in more than one tenant. Docbyte sets up which tenants those are. To see them, call GET /v2/archive/tenants, and use the id of a tenant as the header value:
tenant: acme-records
-
If you leave it out, the archive uses the tenant in your token.
-
If it names a tenant that your client can't work in, the call gets a
403error with the reasonPERMISSION_DENIED.
enrichers
By default, a package in a response only has its basic fields, such as packageId and packageType. With the enrichers header, you ask for more. List the values that you want, separated by commas:
enrichers: metadata,representations,retentionstatus
You can use it on the endpoints that return packages, for example GET /v2/aip/{packageId}, GET /v2/fileplan, GET /v2/search/{searchConfig}, and GET /v2/sip. Each value adds one field:
|
Value |
Adds |
Works on |
|---|---|---|
|
|
|
Packages in the archive (AIPs) |
|
|
|
AIPs |
|
|
|
AIPs |
|
|
|
AIPs |
|
|
|
AIPs |
|
|
|
AIPs in the results of |
|
|
|
AIPs, SIPs, and ingest statuses |
|
|
|
AIPs, SIPs, and ingest statuses |
|
|
|
Users, in the Admin API |
The values are case-sensitive. A value that doesn't apply to the response is ignored.
Response headers
|
Header |
When you get it |
What it holds |
|---|---|---|
|
|
On every error from a |
The ID of the error, the same as |
|
|
On a |
|
|
|
On downloads and exports |
The file name, for example |
To handle errors, go to Errors.