curl --request GET \
--url https://{tenant}.earnie.dev/v1/sbom/snapshots/{snapshotId}/document \
--header 'Authorization: Bearer <token>'import requests
url = "https://{tenant}.earnie.dev/v1/sbom/snapshots/{snapshotId}/document"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{tenant}.earnie.dev/v1/sbom/snapshots/{snapshotId}/document', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenant}.earnie.dev/v1/sbom/snapshots/{snapshotId}/document",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{tenant}.earnie.dev/v1/sbom/snapshots/{snapshotId}/document"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{tenant}.earnie.dev/v1/sbom/snapshots/{snapshotId}/document")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}.earnie.dev/v1/sbom/snapshots/{snapshotId}/document")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}Download a rendered SBOM document (original bytes)
Returns the byte-exact rendered document for the requested format (default cyclonedx). A format not yet rendered responds 404 (format_not_rendered). Never mutates the snapshot.
The response body is JSON for cyclonedx/spdx/cra-sbom-annex, plain text (text/plain; charset=utf-8) for attribution — the NOTICE-style document is not a JSON structure — HTML (text/html; charset=utf-8) for export-control and report-html, a ZIP archive (application/zip) of CSV files for report-csv, an Excel workbook (application/vnd.openxmlformats-officedocument.spreadsheetml.sheet) for report-xlsx and a PDF (application/pdf) for report-pdf. The four report formats are served as an attachment.
curl --request GET \
--url https://{tenant}.earnie.dev/v1/sbom/snapshots/{snapshotId}/document \
--header 'Authorization: Bearer <token>'import requests
url = "https://{tenant}.earnie.dev/v1/sbom/snapshots/{snapshotId}/document"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{tenant}.earnie.dev/v1/sbom/snapshots/{snapshotId}/document', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenant}.earnie.dev/v1/sbom/snapshots/{snapshotId}/document",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{tenant}.earnie.dev/v1/sbom/snapshots/{snapshotId}/document"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{tenant}.earnie.dev/v1/sbom/snapshots/{snapshotId}/document")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}.earnie.dev/v1/sbom/snapshots/{snapshotId}/document")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}Authorizations
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
Query Parameters
Rendered SBOM format. cyclonedx (1.7) and spdx (2.3 Lite) can be produced by either generate or render-new-format. attribution is the OSPO attribution/notice document — it is render-only: POST .../scans/{scanId}:generate always rejects it (unsupported_format); only POST .../snapshots/{snapshotId}:render can produce it. It is rendered once from the stored inventory plus a live attribution fetch, then frozen like any other artifact — its SnapshotArtifact.attribution_fetched_at records when that fetch happened. export-control is a self-contained HTML evidence report frozen only when an entitled crypto snapshot is generated; it is download-only. cra-sbom-annex is a generation-only CycloneDX 1.7 variant containing cryptographic assets as components. It accompanies a product SBOM; it is not a CRA conformity assessment. report-html, report-csv, report-xlsx and report-pdf are the human-readable report of the snapshot: a summary, the components and licenses, the vulnerabilities, the crypto inventory and the AI models the snapshot holds, and the review state frozen with it. They are render-only like attribution, but need no upstream fetch: both are built from the stored inventory alone. report-html is one self-contained, print-friendly page; report-csv is a .zip of one UTF-8 CSV per section. A section the caller may not see is in none of them.
cyclonedx, spdx, attribution, export-control, cra-sbom-annex, report-html, report-csv, report-xlsx, report-pdf Response
The rendered document bytes.
The response is of type object.