Skip to content

API reference.

One HTTPS API, called with curl from any pipeline. Nothing to install and nothing to run: the CI integration is this API and an example to copy.

BitHive Reporting Desk API · 0.11.0

Authentication

Every request carries an API token as a bearer token: "Authorization: Bearer <token>". Tokens are created in the application, carry scopes, may be limited to one product, and expire. A token that is unknown, expired or revoked is answered with 401 and a problem document.

Scopes

A token carries the scopes it was given, and nothing else. An endpoint that needs a scope the token does not carry answers 403; the scope each one needs is named with it below.

ScopeAllows
products:readRead the account's products.
sboms:readRead uploaded bills of materials, their components and the stored document.
sboms:writeUpload bills of materials, name their releases and put them on the market or take them off.
findings:readRead a product's findings and its coverage.
sboms:uploadUpload bills of materials and nothing else; the upload also accepts sboms:write.
cases:readRead the CRA cases with their deadlines and the state of each stage's report.
records:readRead the incident records with their obligations and deadlines, as the token's creator sees them.
records:writeCreate incident records and record reports as submitted; beta accounts only.
findings:decideRecord VEX statements on a product's findings, as the token's creator may.

Rate limits

Two limits, both counted per hour. A token may make 600 requests in an hour; an address that presents tokens that do not work is turned away after 20 failures. Over either one, the answer is 429 with a Retry-After header saying how long the window is.

Errors

Every endpoint can answer with these, so they are here once rather than on each. The body is a problem document (RFC 9457), and the content type is application/problem+json. Only the answers particular to an endpoint are listed with it.

StatusWhat it means
401The API token is missing, unknown, expired or revoked.
403The API token does not carry the required scope, or, for a write, the account is suspended because a payment is outstanding or its subscription has ended. Reading continues in both cases; the detail says which applies.
404The resource does not exist, or the token may not see it.
405The resource does not support this method.
413The document is larger than 10 MiB.
429The caller is over one of the two limits: requests for this token, or failed authentications from this address. Retry-After says how long the window is.

Example

{
  "type": "about:blank",
  "title": "Unauthorized",
  "status": 401,
  "detail": "The API token is unknown, expired or revoked."
}

Servers

  • https://app.bithive-it.com Production

Products

Bills of materials

Findings and coverage

Cases

Incident records

What comes back

The contract itself. This page is built from the OpenAPI document of the service. It is published as a file, so a client generator can read the same contract this page describes. Download openapi.yaml

Docs

Start free 14-day trial