Download an image's bill of materials
import requests
url = "https://platform.ankra.app/org/security/sbom/image/export"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://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://platform.ankra.app/org/security/sbom/image/export \
--header 'Authorization: Bearer <token>'{}{
"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
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
import requests
url = "https://platform.ankra.app/org/security/sbom/image/export"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://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://platform.ankra.app/org/security/sbom/image/export \
--header 'Authorization: Bearer <token>'{}{
"detail": "<string>"
}{
"detail": "permission_denied",
"permission": "<string>",
"scope_type": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
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.