Edit a stack profile summary candidate (browser session)
import requests
url = "https://api.platform.ankra.app/org/stack-profiles/summary-generations/{generation_id}/candidate"
payload = {
"expected_candidate_revision": 2,
"outcomes": [{ "fact_ids": ["<string>"] }]
}
headers = {
"cookie": "ankra_session=",
"X-Ankra-CSRF": "<x-ankra-csrf>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
cookie: 'ankra_session=',
'X-Ankra-CSRF': '<x-ankra-csrf>',
'Content-Type': 'application/json'
},
body: JSON.stringify({expected_candidate_revision: 2, outcomes: [{fact_ids: ['<string>']}]})
};
fetch('https://api.platform.ankra.app/org/stack-profiles/summary-generations/{generation_id}/candidate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PUT \
--url https://api.platform.ankra.app/org/stack-profiles/summary-generations/{generation_id}/candidate \
--header 'Content-Type: application/json' \
--header 'X-Ankra-CSRF: <x-ankra-csrf>' \
--cookie ankra_session= \
--data '
{
"expected_candidate_revision": 2,
"outcomes": [
{
"fact_ids": [
"<string>"
]
}
]
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"state": "queued",
"review_state": "unreviewed",
"revision": 2,
"candidate_revision": 1,
"summary_revision": 1,
"source_revision": 2,
"outcomes": [
{
"kind": "logging",
"claims": [
{
"fact_id": "<string>",
"resource_id": "<string>",
"subject_id": "<string>",
"statement": "<string>",
"applicability": "fixed",
"scope_id": "<string>",
"condition": {
"operator": "equals",
"parameter_id": "<string>",
"equals": true,
"children": "<array>"
}
}
]
}
],
"selection": [
{
"kind": "logging",
"fact_ids": [
"<string>"
]
}
],
"facts": [
{
"id": "<string>",
"resource_id": "<string>",
"predicate": "log_collection",
"subject_id": "<string>",
"applicability": "fixed",
"evidence": [
{
"resource_id": "<string>",
"document": 1,
"path": "<string>",
"artifact_digest": "<string>"
}
],
"enabled": true,
"count": 1,
"scope_id": "<string>",
"condition": {
"operator": "equals",
"parameter_id": "<string>",
"equals": true,
"children": "<array>"
}
}
],
"coverage": [
{
"resource_id": "<string>",
"reason": "unsupported_format"
}
],
"parameters": [
{
"id": "<string>",
"default": true
}
],
"error_code": "quota_exceeded"
}{
"detail": "<string>",
"code": "outcome_unknown"
}Stack Profiles
Edit a stack profile summary candidate (browser session)
Reads and decisions use the primary database with fresh permission, credential and source checks. Responses are private/no-store. Summary revisions never create or advance a workload profile version. No request accepts snapshots, approval identities or provider configuration.
PUT
/
org
/
stack-profiles
/
summary-generations
/
{generation_id}
/
candidate
Edit a stack profile summary candidate (browser session)
import requests
url = "https://api.platform.ankra.app/org/stack-profiles/summary-generations/{generation_id}/candidate"
payload = {
"expected_candidate_revision": 2,
"outcomes": [{ "fact_ids": ["<string>"] }]
}
headers = {
"cookie": "ankra_session=",
"X-Ankra-CSRF": "<x-ankra-csrf>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
cookie: 'ankra_session=',
'X-Ankra-CSRF': '<x-ankra-csrf>',
'Content-Type': 'application/json'
},
body: JSON.stringify({expected_candidate_revision: 2, outcomes: [{fact_ids: ['<string>']}]})
};
fetch('https://api.platform.ankra.app/org/stack-profiles/summary-generations/{generation_id}/candidate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PUT \
--url https://api.platform.ankra.app/org/stack-profiles/summary-generations/{generation_id}/candidate \
--header 'Content-Type: application/json' \
--header 'X-Ankra-CSRF: <x-ankra-csrf>' \
--cookie ankra_session= \
--data '
{
"expected_candidate_revision": 2,
"outcomes": [
{
"fact_ids": [
"<string>"
]
}
]
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"state": "queued",
"review_state": "unreviewed",
"revision": 2,
"candidate_revision": 1,
"summary_revision": 1,
"source_revision": 2,
"outcomes": [
{
"kind": "logging",
"claims": [
{
"fact_id": "<string>",
"resource_id": "<string>",
"subject_id": "<string>",
"statement": "<string>",
"applicability": "fixed",
"scope_id": "<string>",
"condition": {
"operator": "equals",
"parameter_id": "<string>",
"equals": true,
"children": "<array>"
}
}
]
}
],
"selection": [
{
"kind": "logging",
"fact_ids": [
"<string>"
]
}
],
"facts": [
{
"id": "<string>",
"resource_id": "<string>",
"predicate": "log_collection",
"subject_id": "<string>",
"applicability": "fixed",
"evidence": [
{
"resource_id": "<string>",
"document": 1,
"path": "<string>",
"artifact_digest": "<string>"
}
],
"enabled": true,
"count": 1,
"scope_id": "<string>",
"condition": {
"operator": "equals",
"parameter_id": "<string>",
"equals": true,
"children": "<array>"
}
}
],
"coverage": [
{
"resource_id": "<string>",
"reason": "unsupported_format"
}
],
"parameters": [
{
"id": "<string>",
"default": true
}
],
"error_code": "quota_exceeded"
}{
"detail": "<string>",
"code": "outcome_unknown"
}Authorizations
Browser session. Mutations also require X-Ankra-CSRF.
Headers
Must match the authenticated browser CSRF cookie.
Path Parameters
Body
application/json
Strict JSON, maximum 8192 bytes. Repeated and unknown object fields are rejected without echoing values.
Response
Current authorized summary state
Available options:
queued, running, succeeded, failed, cancelled, expired, superseded Available options:
unreviewed, approved, rejected, stale Required range:
x >= 1Required range:
x >= 0Current approved-pointer revision to supply as expected_approved_revision when reviewing; advances on withdrawal too.
Required range:
x >= 0Required range:
x >= 1Maximum array length:
5Show child attributes
Show child attributes
Maximum array length:
5Show child attributes
Show child attributes
Maximum array length:
512Show child attributes
Show child attributes
Maximum array length:
256Show child attributes
Show child attributes
Maximum array length:
64Show child attributes
Show child attributes
Available options:
quota_exceeded, provider_unavailable, unsupported_source, stale_source, invalid_output, cancelled, timed_out, permission_denied