Download an image's bill of materials (browser session)
import requests
url = "https://api.platform.ankra.app/org/security/sbom/image/export"
headers = {"cookie": "ankra_session="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: 'ankra_session='}};
fetch('https://api.platform.ankra.app/org/security/sbom/image/export', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://api.platform.ankra.app/org/security/sbom/image/export \
--cookie ankra_session={}{
"detail": "<string>"
}{
"detail": "permission_denied",
"permission": "<string>",
"scope_type": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Security
Download an image's bill of materials (browser session)
Download one image’s bill of materials, rebuilt from the stored components: a CycloneDX 1.5 JSON document by default, or a flat CSV. Every component of the image is included, unpaged.
GET
/
org
/
security
/
sbom
/
image
/
export
Download an image's bill of materials (browser session)
import requests
url = "https://api.platform.ankra.app/org/security/sbom/image/export"
headers = {"cookie": "ankra_session="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: 'ankra_session='}};
fetch('https://api.platform.ankra.app/org/security/sbom/image/export', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://api.platform.ankra.app/org/security/sbom/image/export \
--cookie ankra_session={}{
"detail": "<string>"
}{
"detail": "permission_denied",
"permission": "<string>",
"scope_type": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Browser session. Mutations also require X-Ankra-CSRF.
Query Parameters
The image identity: its digest, or repository:tag when the scanner knew no digest.
cyclonedx (default) or csv.
Available options:
cyclonedx, csv Response
The bill of materials as a download (Content-Disposition: attachment)
A CycloneDX 1.5 document rebuilt from the stored components.