The API key's organization's units with their latest report, a page at a time
const url = 'https://example.com/v1/units?delivery=online&upgrade=any&limit=50';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://example.com/v1/units?delivery=online&upgrade=any&limit=50' \ --header 'Authorization: Bearer <token>'As /v1/orgs/{org}/units.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Part of the unit ID, of the release it reported or of one of its packages’ names, any case
The release text the units reported, exactly
Only the units whose linked release should be upgraded: it has an open finding that is affected or known exploited. now: a newer release of the same variant, with an SBOM, has none of those findings open. waiting: there is no such release yet. any: both.
The next of the previous page
Responses
Section titled “Responses”A page of units
object
A unit’s latest report without its packages, as the unit list shows it. The fields are Report’s.
object
object
The product’s name.
The number of packages /units/report lists for the unit
The after of the next page; absent on the last. Opaque
More units follow next
Example
{ "items": [ { "delivery": "online" } ]}Request.invalid (params.field q, delivery, release, upgrade, limit or after)
Missing or invalid API key
Over the operation’s rate-limit budget (x-affectra-budget): code request.rateLimited with params.budget. Wait Retry-After seconds before trying again.
Every error answer, Content-Type
application/problem+json. The web app and integrations translate code; detail is English,
for people reading curl output or CI logs, and may change wording at
any time. Match on code, never on detail.
object
The HTTP status
Stable error codes. A code is never renamed; new ones may be added, so
a client falls back to detail for a code it doesn’t know. Another
organization’s object answers notFound, the same as a missing one.
What went wrong
Values the code’s message needs, e.g. {“field”: “version”}. Only values the caller sent or may see. Empty when the message needs none.
object
Example
{ "code": "notFound"}Headers
Section titled “Headers”Seconds until a request would be allowed again, at least 1