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
Body
application/json
Response
The verdict and the decision a deploy would reach.