Get an application's last provenance checks
import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/provenance/checks"
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/api/v1/org/applications/{application_id}/provenance/checks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/org/applications/{application_id}/provenance/checks \
--header 'Authorization: Bearer <token>'{
"application_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"read_state": "ok",
"kept_from": "2023-11-07T05:31:56Z",
"environments": [
{
"environment_id": "<string>",
"placements": [
{
"installation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"namespace": "<string>",
"last_check": {
"checked_at": "2023-11-07T05:31:56Z",
"source": "check_now",
"by": {
"kind": "member",
"name": "<string>"
},
"image_tag": "<string>",
"mode": "off",
"decision": "deploy",
"state": "verified",
"message": "<string>",
"images": [
{
"image": "<string>",
"digest": "<string>",
"state": "verified",
"reason": "verified",
"message": "<string>",
"key_id": "<string>",
"pipeline_run_id": "<string>",
"commit_sha": "<string>"
}
],
"unchecked_images": [
"<string>"
],
"images_capped": true,
"is_current": true
}
}
],
"placements_capped": true,
"placements_not_checkable": 123
}
]
}Deploy Provenance
Get an application's last provenance checks
The newest provenance check Ankra kept for each installation of the application, by environment: the check it made at the installation’s last release that checked, or a person’s Check now, whichever is newer. Each says when, by whom, the tag and digests checked, the result, and whether that tag is still what the installation stores. A caller confined to a project sees only the placements in it. Requires pipelines.read.
GET
/
api
/
v1
/
org
/
applications
/
{application_id}
/
provenance
/
checks
Get an application's last provenance checks
import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/provenance/checks"
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/api/v1/org/applications/{application_id}/provenance/checks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/org/applications/{application_id}/provenance/checks \
--header 'Authorization: Bearer <token>'{
"application_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"read_state": "ok",
"kept_from": "2023-11-07T05:31:56Z",
"environments": [
{
"environment_id": "<string>",
"placements": [
{
"installation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"namespace": "<string>",
"last_check": {
"checked_at": "2023-11-07T05:31:56Z",
"source": "check_now",
"by": {
"kind": "member",
"name": "<string>"
},
"image_tag": "<string>",
"mode": "off",
"decision": "deploy",
"state": "verified",
"message": "<string>",
"images": [
{
"image": "<string>",
"digest": "<string>",
"state": "verified",
"reason": "verified",
"message": "<string>",
"key_id": "<string>",
"pipeline_run_id": "<string>",
"commit_sha": "<string>"
}
],
"unchecked_images": [
"<string>"
],
"images_capped": true,
"is_current": true
}
}
],
"placements_capped": true,
"placements_not_checkable": 123
}
]
}Authorizations
Response
The last kept check of each placement.