Find where an image is declared (browser session)
import requests
url = "https://api.platform.ankra.app/org/security/image-declarations"
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/image-declarations', 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/image-declarations \
--cookie ankra_session={
"image": {
"input": "<string>",
"repository": "<string>",
"tag": "<string>",
"digest": "<string>"
},
"completeness": {
"is_complete": true,
"incomplete_reasons": [
{
"code": "<string>",
"count": 123
}
]
},
"clusters_searched": 123,
"clusters": [
{
"cluster_id": "<string>",
"cluster_name": "<string>",
"change_via": "<string>",
"running_inventory": {
"state": "<string>",
"agent_online": true,
"pods_last_synced_at": "2023-11-07T05:31:56Z",
"pods_last_full_listing_at": "2023-11-07T05:31:56Z"
},
"gitops_sync_state": "<string>",
"gitops_sync_blocked_reasons": [
"<string>"
]
}
],
"clusters_excluded": [
{
"cluster_id": "<string>",
"cluster_name": "<string>",
"reason": "archived"
}
],
"declarations": [
{
"cluster_id": "<string>",
"cluster_name": "<string>",
"stack_name": "<string>",
"member_kind": "<string>",
"member_name": "<string>",
"key_path": "<string>",
"reference": "<string>",
"form": "<string>",
"is_digest_pinned": true,
"stored_line": 123,
"change_via": "<string>",
"gitops": {
"provider": "<string>",
"repository": "<string>",
"branch": "<string>",
"file_path": "<string>",
"line": 123,
"sync_state": "<string>",
"line_unknown_reason": "<string>",
"file_url": "<string>",
"sync_blocked_reasons": [
"<string>"
]
},
"stack_has_open_draft": true,
"running_workloads": [
{
"cluster_id": "<string>",
"cluster_name": "<string>",
"namespace": "<string>",
"workload_kind": "<string>",
"workload_name": "<string>",
"container_name": "<string>",
"container_kind": "<string>",
"image": "<string>",
"pods": 123,
"add_ons_in_namespace": [
"<string>"
],
"applications": [
{
"id": "<string>",
"name": "<string>"
}
],
"match_unknown_reasons": [
"<string>"
],
"declaring_objects": [
{
"stack_name": "<string>",
"member_kind": "<string>",
"member_name": "<string>",
"stored_line": 123,
"resource_kind": "<string>",
"resource_name": "<string>"
}
],
"declaring_objects_capped": true
}
],
"member_state": "<string>",
"application": {
"id": "<string>",
"name": "<string>"
},
"resource_kind": "<string>",
"resource_name": "<string>",
"resource_namespace": "<string>",
"container_name": "<string>",
"container_kind": "<string>",
"add_on_namespace": "<string>",
"namespace_as_written": "<string>",
"namespace_unknown_reason": "<string>",
"tag": "<string>",
"digest": "<string>",
"is_templated": true,
"rendered_reference": "<string>",
"registry_named_elsewhere": true,
"matches_requested_version": true,
"in_text_block": true,
"gitops_unknown_reason": "<string>",
"running_workloads_capped": true
}
],
"member_notes": [
{
"cluster_id": "<string>",
"stack_name": "<string>",
"member_kind": "<string>",
"member_name": "<string>",
"agents_md": "<string>",
"agents_md_omitted": true
}
],
"declarations_capped": true,
"unresolved_mentions": [
{
"cluster_id": "<string>",
"cluster_name": "<string>",
"stack_name": "<string>",
"member_kind": "<string>",
"member_name": "<string>",
"stored_line": 123,
"reason": "<string>",
"key_path": "<string>"
}
],
"unresolved_mentions_capped": true,
"running_undeclared": [
{
"cluster_id": "<string>",
"cluster_name": "<string>",
"namespace": "<string>",
"workload_kind": "<string>",
"workload_name": "<string>",
"container_name": "<string>",
"container_kind": "<string>",
"image": "<string>",
"pods": 123,
"add_ons_in_namespace": [
"<string>"
],
"applications": [
{
"id": "<string>",
"name": "<string>"
}
],
"match_unknown_reasons": [
"<string>"
],
"declaring_objects": [
{
"stack_name": "<string>",
"member_kind": "<string>",
"member_name": "<string>",
"stored_line": 123,
"resource_kind": "<string>",
"resource_name": "<string>"
}
],
"declaring_objects_capped": true
}
],
"running_by_application": [
{
"cluster_id": "<string>",
"cluster_name": "<string>",
"namespace": "<string>",
"workload_kind": "<string>",
"workload_name": "<string>",
"container_name": "<string>",
"container_kind": "<string>",
"image": "<string>",
"pods": 123,
"add_ons_in_namespace": [
"<string>"
],
"applications": [
{
"id": "<string>",
"name": "<string>"
}
],
"match_unknown_reasons": [
"<string>"
],
"declaring_objects": [
{
"stack_name": "<string>",
"member_kind": "<string>",
"member_name": "<string>",
"stored_line": 123,
"resource_kind": "<string>",
"resource_name": "<string>"
}
],
"declaring_objects_capped": true
}
],
"running_match_unknown": [
{
"cluster_id": "<string>",
"cluster_name": "<string>",
"namespace": "<string>",
"workload_kind": "<string>",
"workload_name": "<string>",
"container_name": "<string>",
"container_kind": "<string>",
"image": "<string>",
"pods": 123,
"add_ons_in_namespace": [
"<string>"
],
"applications": [
{
"id": "<string>",
"name": "<string>"
}
],
"match_unknown_reasons": [
"<string>"
],
"declaring_objects": [
{
"stack_name": "<string>",
"member_kind": "<string>",
"member_name": "<string>",
"stored_line": 123,
"resource_kind": "<string>",
"resource_name": "<string>"
}
],
"declaring_objects_capped": true
}
],
"running_inventory": "<string>",
"not_searched": [
{
"cluster_id": "<string>",
"cluster_name": "<string>",
"stack_name": "<string>",
"member_kind": "<string>",
"member_name": "<string>",
"reason": "<string>"
}
],
"clusters_excluded_capped": true
}{
"detail": "<string>"
}{
"detail": "permission_denied",
"permission": "<string>",
"scope_type": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}Security
Find where an image is declared (browser session)
Where an image is declared across the stacks of the clusters you can read: each add-on value or manifest that names it, with the key path, the stored line, the Git file and line to change when the stack is synced to GitOps, and the workloads running it. Clusters, members and mentions the search could not read are listed, and completeness says whether the answer is whole. A read: nothing is changed.
GET
/
org
/
security
/
image-declarations
Find where an image is declared (browser session)
import requests
url = "https://api.platform.ankra.app/org/security/image-declarations"
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/image-declarations', 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/image-declarations \
--cookie ankra_session={
"image": {
"input": "<string>",
"repository": "<string>",
"tag": "<string>",
"digest": "<string>"
},
"completeness": {
"is_complete": true,
"incomplete_reasons": [
{
"code": "<string>",
"count": 123
}
]
},
"clusters_searched": 123,
"clusters": [
{
"cluster_id": "<string>",
"cluster_name": "<string>",
"change_via": "<string>",
"running_inventory": {
"state": "<string>",
"agent_online": true,
"pods_last_synced_at": "2023-11-07T05:31:56Z",
"pods_last_full_listing_at": "2023-11-07T05:31:56Z"
},
"gitops_sync_state": "<string>",
"gitops_sync_blocked_reasons": [
"<string>"
]
}
],
"clusters_excluded": [
{
"cluster_id": "<string>",
"cluster_name": "<string>",
"reason": "archived"
}
],
"declarations": [
{
"cluster_id": "<string>",
"cluster_name": "<string>",
"stack_name": "<string>",
"member_kind": "<string>",
"member_name": "<string>",
"key_path": "<string>",
"reference": "<string>",
"form": "<string>",
"is_digest_pinned": true,
"stored_line": 123,
"change_via": "<string>",
"gitops": {
"provider": "<string>",
"repository": "<string>",
"branch": "<string>",
"file_path": "<string>",
"line": 123,
"sync_state": "<string>",
"line_unknown_reason": "<string>",
"file_url": "<string>",
"sync_blocked_reasons": [
"<string>"
]
},
"stack_has_open_draft": true,
"running_workloads": [
{
"cluster_id": "<string>",
"cluster_name": "<string>",
"namespace": "<string>",
"workload_kind": "<string>",
"workload_name": "<string>",
"container_name": "<string>",
"container_kind": "<string>",
"image": "<string>",
"pods": 123,
"add_ons_in_namespace": [
"<string>"
],
"applications": [
{
"id": "<string>",
"name": "<string>"
}
],
"match_unknown_reasons": [
"<string>"
],
"declaring_objects": [
{
"stack_name": "<string>",
"member_kind": "<string>",
"member_name": "<string>",
"stored_line": 123,
"resource_kind": "<string>",
"resource_name": "<string>"
}
],
"declaring_objects_capped": true
}
],
"member_state": "<string>",
"application": {
"id": "<string>",
"name": "<string>"
},
"resource_kind": "<string>",
"resource_name": "<string>",
"resource_namespace": "<string>",
"container_name": "<string>",
"container_kind": "<string>",
"add_on_namespace": "<string>",
"namespace_as_written": "<string>",
"namespace_unknown_reason": "<string>",
"tag": "<string>",
"digest": "<string>",
"is_templated": true,
"rendered_reference": "<string>",
"registry_named_elsewhere": true,
"matches_requested_version": true,
"in_text_block": true,
"gitops_unknown_reason": "<string>",
"running_workloads_capped": true
}
],
"member_notes": [
{
"cluster_id": "<string>",
"stack_name": "<string>",
"member_kind": "<string>",
"member_name": "<string>",
"agents_md": "<string>",
"agents_md_omitted": true
}
],
"declarations_capped": true,
"unresolved_mentions": [
{
"cluster_id": "<string>",
"cluster_name": "<string>",
"stack_name": "<string>",
"member_kind": "<string>",
"member_name": "<string>",
"stored_line": 123,
"reason": "<string>",
"key_path": "<string>"
}
],
"unresolved_mentions_capped": true,
"running_undeclared": [
{
"cluster_id": "<string>",
"cluster_name": "<string>",
"namespace": "<string>",
"workload_kind": "<string>",
"workload_name": "<string>",
"container_name": "<string>",
"container_kind": "<string>",
"image": "<string>",
"pods": 123,
"add_ons_in_namespace": [
"<string>"
],
"applications": [
{
"id": "<string>",
"name": "<string>"
}
],
"match_unknown_reasons": [
"<string>"
],
"declaring_objects": [
{
"stack_name": "<string>",
"member_kind": "<string>",
"member_name": "<string>",
"stored_line": 123,
"resource_kind": "<string>",
"resource_name": "<string>"
}
],
"declaring_objects_capped": true
}
],
"running_by_application": [
{
"cluster_id": "<string>",
"cluster_name": "<string>",
"namespace": "<string>",
"workload_kind": "<string>",
"workload_name": "<string>",
"container_name": "<string>",
"container_kind": "<string>",
"image": "<string>",
"pods": 123,
"add_ons_in_namespace": [
"<string>"
],
"applications": [
{
"id": "<string>",
"name": "<string>"
}
],
"match_unknown_reasons": [
"<string>"
],
"declaring_objects": [
{
"stack_name": "<string>",
"member_kind": "<string>",
"member_name": "<string>",
"stored_line": 123,
"resource_kind": "<string>",
"resource_name": "<string>"
}
],
"declaring_objects_capped": true
}
],
"running_match_unknown": [
{
"cluster_id": "<string>",
"cluster_name": "<string>",
"namespace": "<string>",
"workload_kind": "<string>",
"workload_name": "<string>",
"container_name": "<string>",
"container_kind": "<string>",
"image": "<string>",
"pods": 123,
"add_ons_in_namespace": [
"<string>"
],
"applications": [
{
"id": "<string>",
"name": "<string>"
}
],
"match_unknown_reasons": [
"<string>"
],
"declaring_objects": [
{
"stack_name": "<string>",
"member_kind": "<string>",
"member_name": "<string>",
"stored_line": 123,
"resource_kind": "<string>",
"resource_name": "<string>"
}
],
"declaring_objects_capped": true
}
],
"running_inventory": "<string>",
"not_searched": [
{
"cluster_id": "<string>",
"cluster_name": "<string>",
"stack_name": "<string>",
"member_kind": "<string>",
"member_name": "<string>",
"reason": "<string>"
}
],
"clusters_excluded_capped": true
}{
"detail": "<string>"
}{
"detail": "permission_denied",
"permission": "<string>",
"scope_type": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}Authorizations
Query Parameters
Response
Successful response
Where an image is declared across the stacks of the clusters the caller can read, and what runs it. An incomplete search says so in completeness.