import requests
url = "https://platform.ankra.app/api/v1/org/service-admission/credentials/{family_id}/values"
payload = {
"value": "<string>",
"expected_value_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
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({value: '<string>', expected_value_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://platform.ankra.app/api/v1/org/service-admission/credentials/{family_id}/values', 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/service-admission/credentials/{family_id}/values \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"value": "<string>",
"expected_value_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'{
"value": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"state": "pending",
"created_at": "2023-11-07T05:31:56Z",
"activated_at": "2023-11-07T05:31:56Z",
"retired_at": "2023-11-07T05:31:56Z",
"retained": true
},
"replaced": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"value_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"package_digest": "<string>",
"input_name": "<string>",
"mode": "hosted",
"created_at": "2023-11-07T05:31:56Z",
"revoked_at": "2023-11-07T05:31:56Z"
}
],
"granted": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"value_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"package_digest": "<string>",
"input_name": "<string>",
"mode": "hosted",
"created_at": "2023-11-07T05:31:56Z",
"revoked_at": "2023-11-07T05:31:56Z"
}
]
}Create or rotate a reviewed credential value
Requires the applications rollout and live organisation membership. Metadata reads require applications.read; writes require applications.write, intersected with live PAT scope. Browser mutations require CSRF. No secret values or store paths are returned; all responses are no-store. This registry operation does not connect or restart a workload. expected_value_id is required: null requires no active value; otherwise it must match the current active value. A repeated or concurrent stale request cannot replace a newer value. Successful rotation retires the previous value, revokes its grants and returns replacement grant metadata. Store acknowledgement must identify immutable version one. After an uncertain response reload family metadata and review the current value before another write.
import requests
url = "https://platform.ankra.app/api/v1/org/service-admission/credentials/{family_id}/values"
payload = {
"value": "<string>",
"expected_value_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
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({value: '<string>', expected_value_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://platform.ankra.app/api/v1/org/service-admission/credentials/{family_id}/values', 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/service-admission/credentials/{family_id}/values \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"value": "<string>",
"expected_value_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'{
"value": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"state": "pending",
"created_at": "2023-11-07T05:31:56Z",
"activated_at": "2023-11-07T05:31:56Z",
"retired_at": "2023-11-07T05:31:56Z",
"retained": true
},
"replaced": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"value_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"package_digest": "<string>",
"input_name": "<string>",
"mode": "hosted",
"created_at": "2023-11-07T05:31:56Z",
"revoked_at": "2023-11-07T05:31:56Z"
}
],
"granted": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"value_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"package_digest": "<string>",
"input_name": "<string>",
"mode": "hosted",
"created_at": "2023-11-07T05:31:56Z",
"revoked_at": "2023-11-07T05:31:56Z"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.