Plans: Every plan. Refused with 402 while the workspace is read-only. Who: anyone with an API token for the product family; owners and admins create tokens.
POST /api/v1/sboms stores one SBOM for the product family the token belongs to, then matches it within seconds. Send the same file again and Pharus answers with the SBOM it already has, so retries are safe.
Example
--fail-with-body makes curl exit with an error on any 4xx or 5xx answer and still print Pharus’ message, so a failed upload fails the CI step.
Headers
The commit, branch, repository and run link show in the Pipeline card on the SBOM’s page in Pharus.
Query parameters
Body
The raw SBOM file, plain or compressed. Not a multipart form, and not wrapped in another JSON object.- CycloneDX JSON 1.4, 1.5, 1.6 or 1.7, SPDX JSON 2.2 or 2.3, or SPDX 3.0 JSON-LD.
- Yocto’s
<image>.rootfs.spdx.tar.zstarchive of SPDX 2.2 documents, as the build writes it, or a plain.tarof them. - At most 4 MB as sent, and 50 MB decompressed. Gzip keeps most SBOMs far below the first limit.
- At most 50 000 components.
X-Pharus-Version. A new SBOM for a version replaces the active SBOM of that version in the family; SBOMs of other versions stay active. In a family where only the newest SBOM is in use, it replaces every active SBOM of the family instead, whatever their versions. See what happens after an SBOM arrives.
Responses
202 Accepted
A new SBOM was stored. Matching runs after the response.200 OK
The family already has an SBOM with exactly these bytes. Nothing new was stored, and the response describes the SBOM Pharus has, with the samequality, eol and warnings fields.
Errors
Errors return{ "error", "message" }, sometimes with detail. See the error format.
Pharus checks in this order: the token, the rate limit, the body’s size and encoding, the workspace, whether the file is a duplicate, and then the SBOM itself.