Skip to main content
POST
Generate an SBOM from uploaded files

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

X-GitHits-Client-Name
string

Optional client attribution: trimmed printable ASCII, at most 80 bytes. Invalid optional values are dropped.

X-GitHits-Client-Version
string

Optional client-version attribution: trimmed printable ASCII, at most 80 bytes. Invalid optional values are dropped.

X-GitHits-Agent
string

Optional agent attribution: trimmed printable ASCII, at most 160 bytes. Invalid optional values are dropped.

X-GitHits-Session-ID
string

Optional session attribution: trimmed printable ASCII, at most 128 bytes. Invalid optional values are dropped; no session is created.

Query Parameters

format
enum<string>
default:cyclonedx

Output format; a multipart format field overrides this value. No Accept negotiation. Duplicate values and unknown query fields are rejected. cyclonedx returns CycloneDX 1.7 JSON (application/vnd.cyclonedx+json); spdx returns SPDX 2.3 tag-value (text/spdx); text returns a human-readable report (text/plain). All outputs use UTF-8. Accept does not select the successful output format.

Available options:
cyclonedx,
spdx,
text

Body

multipart/form-data

Send a multipart upload. The complete request, including multipart headers and boundaries, must fit within 8,000,000 bytes.

files[]
file[]
required

Repeat the literal field name files[] once per file, with raw UTF-8 file contents rather than base64. Set each part's filename to the file's path relative to a common repository root, for example app/package.json and app/package-lock.json. Preserve directory structure so manifests can be associated with their lockfiles.

Send 1–256 files, each at most 5,242,880 bytes. Each filename must be at most 1,024 UTF-8 bytes and must be relative, with no empty, dot (.) or parent (..) path segments, backslashes or control characters. Every file must be a supported, readable manifest or lockfile; one unusable file rejects the entire upload.

Required array length: 1 - 256 elements
format
enum<string>
default:cyclonedx

Select the response format. This value overrides the query parameter; omit both to receive CycloneDX JSON.

Available options:
cyclonedx,
spdx,
text

Response

Complete UTF-8 document, at most 16,777,216 bytes. Inventory and license evidence may be partial; save this response because no retrieval URL is created.

Extensible CycloneDX 1.7 document. This schema describes a compatible subset, not the entire standard. Additional fields are allowed at every object level; clients must preserve or ignore unfamiliar data. Inventory and license completeness must be read from evidence, not inferred from this schema.

bomFormat
enum<string>
required
Available options:
CycloneDX
specVersion
enum<string>
required
Available options:
1.7
components
object[]

Named project roots and dependency entries. Unresolved declarations remain in document properties rather than becoming package components. The array may be empty when no concrete packages or named roots are available. Separate lockfile occurrences may have the same name and version; do not deduplicate by those fields alone.

compositions
object[]

Completeness declaration for the listed component references.

metadata
object
properties
object[]

Document evidence. githits:completeness distinguishes resolved_manifest_inventory, partial_manifest_inventory, recorded_lockfile_inventory and mixed_dependency_inventory; none guarantees that every license is known. githits:resolution_basis distinguishes manifest_resolution, lockfile_records and lockfile_records_and_manifest_resolution. Inspect githits:resolutions for per-manifest outcomes, githits:declarations for original requirements, and githits:lockfiles and githits:manifest_associations for lockfile coverage. githits:notice summarizes limitations.

serialNumber
string

Unique identifier for this generated document. This URN is not a retrieval URL.

Pattern: ^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
version
integer

Document revision, not a package version.

Required range: x >= 1