Verify images against an application's provenance policy
import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/provenance/verify"
payload = { "images": ["<string>"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({images: ['<string>']})
};
fetch('https://platform.ankra.app/api/v1/org/applications/{application_id}/provenance/verify', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/org/applications/{application_id}/provenance/verify \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"images": [
"<string>"
]
}
'{
"application_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mode": "off",
"decision": "deploy",
"verdict": {
"state": "verified",
"images": [
{
"image": "<string>",
"state": "verified",
"reason": "verified",
"message": "<string>",
"digest": "<string>",
"key_id": "<string>",
"pipeline_run_id": "<string>",
"commit_sha": "<string>"
}
],
"unchecked_images": [
"<string>"
]
}
}Deploy Provenance
Verify images against an application's provenance policy
A dry-run: checks each image exactly as the application’s deploy would - signed provenance from this organisation’s pipeline, a trusted key, this application, a gate that passed the digest - and answers what a deploy under the application’s mode would do. Nothing is deployed, no finding is filed and no key is created. Images outside the application’s registry are reported, never judged. Requires pipelines.read.
POST
/
api
/
v1
/
org
/
applications
/
{application_id}
/
provenance
/
verify
Verify images against an application's provenance policy
import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/provenance/verify"
payload = { "images": ["<string>"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({images: ['<string>']})
};
fetch('https://platform.ankra.app/api/v1/org/applications/{application_id}/provenance/verify', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/org/applications/{application_id}/provenance/verify \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"images": [
"<string>"
]
}
'{
"application_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mode": "off",
"decision": "deploy",
"verdict": {
"state": "verified",
"images": [
{
"image": "<string>",
"state": "verified",
"reason": "verified",
"message": "<string>",
"digest": "<string>",
"key_id": "<string>",
"pipeline_run_id": "<string>",
"commit_sha": "<string>"
}
],
"unchecked_images": [
"<string>"
]
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json
Required array length:
1 - 32 elementsMaximum string length:
512Response
The verdict and the decision a deploy would reach.
Available options:
off, warn, enforce What a deploy of these images under the application's mode would do.
Available options:
deploy, deploy_with_finding, refuse, not_checked Show child attributes
Show child attributes