26.3.0 26.2.0 26.1.0 25.4.0 25.3.0
26.3.0 26.2.0 26.1.0 25.4.0 25.3.0

Common Headers

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

Authorization

Yes

Your access token, as Bearer <access-token>. To get one, go to Authentication.

tenant

No

The tenant to work in.

X-Docbyte-Repository

No

Deprecated: use tenant. If you send both, tenant wins.

enrichers

No

Extra information to add to the packages in the response, such as their metadata.

Content-Type

With a body

The format of the request body. For a JSON body, send application/json.

Accept

No

The format that you want back. Most endpoints return application/json. Exports and downloads return other formats, such as text/csv or application/zip, and their pages say which.

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 403 error with the reason PERMISSION_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

metadata

metadata: the package's descriptive metadata, grouped per schema.

Packages in the archive (AIPs)

representations

representations: the package's representations, with the name, format, and download link of each file.

AIPs

breadcrumb

breadcrumb: the parent packages in the file plan, each with its title and packageId.

AIPs

retentionstatus

retentionStatus: whether the package is under a legal hold, and the date until which the archive keeps it.

AIPs

evidence

evidence: the package's integrity evidence.

AIPs

searchcolumns

searchcolumns: the values of the columns that the search configuration shows.

AIPs in the results of GET /v2/search/{searchConfig}

pluginreports

pluginReports: the preservation actions that ran on the package, each with its status, date, and message.

AIPs, SIPs, and ingest statuses

permissions

permissions: the permissions that your client has on the package.

AIPs, SIPs, and ingest statuses

userPackage

aip: the package that's linked to the user.

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

X-Error-Id

On every error from a /v2 endpoint

The ID of the error, the same as errorId in the error body. A browser app can't read this header: use errorId instead.

WWW-Authenticate

On a 401 error when the request had no token

Bearer: the type of token that the API expects.

Content-Disposition

On downloads and exports

The file name, for example attachment; filename="report.csv".

To handle errors, go to Errors.