Skip to main content
POST
Generate an SBOM snapshot from a scan

Authorizations

Authorization
string
header
required

An Earnie API key, sent as Authorization: Bearer sk_earnie_.... Create one under Settings > API keys. The key's scopes decide which operations it may call.

Path Parameters

scanId
string<uuid>
required

Body

application/json

Options for an explicit generate action.

formats
enum<string>[]

Formats to render immediately. Defaults to [cyclonedx].

Available options:
cyclonedx,
spdx,
cra-sbom-annex
include_vulnerabilities
boolean
default:false

Embed known vulnerabilities (CycloneDX only). Default off.

include_crypto
boolean
default:false
deprecated

Embed cryptographic assets (CycloneDX only; an spdx artifact names them in omitted_sections). Default off. Ignored when include is set.

include
enum<string>[]

The sections to generate. [crypto] is a CBOM, [ai] an AIBOM and [oss] an SBOM. Without it, the snapshot holds OSS, crypto only with include_crypto, and AI models when the organization has AI provenance. A section the organization has not enabled is refused with 403 module_disabled, one the API key is not scoped to with 403 module_scope_forbidden. spdx needs oss, and carries only oss: its artifact lists crypto and ai in omitted_sections.

Minimum array length: 1

A section a snapshot holds. oss is the open-source components (an SBOM), crypto the cryptographic assets (a CBOM), ai the identified AI models (an AIBOM).

Available options:
oss,
crypto,
ai

Response

Snapshot minted.

id
string<uuid>
required
scan_id
string<uuid>
required
project_id
string<uuid>
required
generated_at
string<date-time>
required
generated_by
object
required

The actor that generated the snapshot (audit provenance).

review_coverage
number<double>
required

Share of reviewable finding occurrences with a current decision at generation time, 0..1 (soft gate — never blocks). Multiple files of one component are separate occurrences.

component_count
integer
required
include_vulnerabilities
boolean
required
include_crypto
boolean
required

Same as includes containing crypto.

includes
enum<string>[]
required

The sections this snapshot was generated with. A section that came out empty is still listed.

A section a snapshot holds. oss is the open-source components (an SBOM), crypto the cryptographic assets (a CBOM), ai the identified AI models (an AIBOM).

Available options:
oss,
crypto,
ai
model_count
integer
required

How many identified AI models the snapshot froze.

inventory_schema_version
string
required
artifacts
object[]
required
stale
boolean

True when the current effective decisions differ from the set captured for generation, including withdrawn decisions after reopening. Also true when currentness cannot be verified (legacy missing capture or unreadable review state). Only set on the newest snapshot in a project list; a read-time comparison, not stored state.