import requests
url = "https://platform.ankra.app/api/v1/org/service-admission/instances/{instance_id}/upgrades/{upgrade_id}/confirm"
payload = { "digest": "<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({digest: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/org/service-admission/instances/{instance_id}/upgrades/{upgrade_id}/confirm', 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/instances/{instance_id}/upgrades/{upgrade_id}/confirm \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"digest": "<string>"
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"instance_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"plan": {
"schema_version": 123,
"instance_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"actor_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"generation": 123,
"stack_resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stack_name": "<string>",
"profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"from": {
"package_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"package_version": "<string>",
"package_digest": "<string>",
"profile_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"profile_version": 123,
"profile_digest": "<string>",
"image": "<string>",
"postgresql_major": 123,
"postgresql_version": "<string>",
"chart_version": "<string>"
},
"to": {
"package_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"package_version": "<string>",
"package_digest": "<string>",
"profile_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"profile_version": 123,
"profile_digest": "<string>",
"image": "<string>",
"postgresql_major": 123,
"postgresql_version": "<string>",
"chart_version": "<string>"
},
"rollback": true,
"changelog": [
{
"profile_version": 123,
"changelog": "<string>"
}
],
"disruption": {
"instances": 123,
"tier": "standard",
"restart": "rolling",
"summary": "<string>"
},
"consumers": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"application_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"namespace": "<string>"
}
],
"backups": {
"policy": "declared",
"enabled": true,
"vault": "<string>",
"schedule": "<string>"
},
"recorded_inputs_digest": "<string>",
"effects": [
"<string>"
],
"expires_at": "2023-11-07T05:31:56Z"
},
"digest": "<string>",
"state": "pending",
"created_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"confirmed_at": "2023-11-07T05:31:56Z",
"operation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"backup_observation": {
"state": "protected",
"reason": "<string>",
"last_complete_restore_point_at": "<string>",
"stale": true,
"not_capturing": true
},
"warnings": [
"<string>"
]
}Confirm a managed-service upgrade by its digest
Requires the applications rollout flag, applications.deploy in the cluster’s project, and clusters.read and clusters.operate on the service’s cluster, all intersected with live token scopes: the authority setting the service up on that cluster needed. Accepts only the stored review and the digest its actor reviewed. In one stack write, under the cluster lock, it resolves the plan again and refuses when anything it covers moved, the service stopped serving (a move through a failed roll’s exit is confirmed only while that roll still reads as failed), an open resize or retirement review of the service, or the review expired, then rolls the reviewed profile version onto the service’s stack in place with the inputs its profile tracking recorded, keeping the stack’s backup policy, records the new version on the service and on the stack’s profile tracking, and audits it. The platform then deploys the stack and CloudNativePG restarts each instance onto the new image. A rollout the shared stack write refuses (a target version that drops a member of the service’s stack, or a chart moved backwards that a rollback did not name) is answered 409 or 422 with the sentence, and nothing changes. Confirmed means the version is declared on the stack and recorded; whether the cluster applied it is the outcome of operation_id. A retry returns the same record.
import requests
url = "https://platform.ankra.app/api/v1/org/service-admission/instances/{instance_id}/upgrades/{upgrade_id}/confirm"
payload = { "digest": "<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({digest: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/org/service-admission/instances/{instance_id}/upgrades/{upgrade_id}/confirm', 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/instances/{instance_id}/upgrades/{upgrade_id}/confirm \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"digest": "<string>"
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"instance_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"plan": {
"schema_version": 123,
"instance_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"actor_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"generation": 123,
"stack_resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stack_name": "<string>",
"profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"from": {
"package_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"package_version": "<string>",
"package_digest": "<string>",
"profile_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"profile_version": 123,
"profile_digest": "<string>",
"image": "<string>",
"postgresql_major": 123,
"postgresql_version": "<string>",
"chart_version": "<string>"
},
"to": {
"package_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"package_version": "<string>",
"package_digest": "<string>",
"profile_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"profile_version": 123,
"profile_digest": "<string>",
"image": "<string>",
"postgresql_major": 123,
"postgresql_version": "<string>",
"chart_version": "<string>"
},
"rollback": true,
"changelog": [
{
"profile_version": 123,
"changelog": "<string>"
}
],
"disruption": {
"instances": 123,
"tier": "standard",
"restart": "rolling",
"summary": "<string>"
},
"consumers": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"application_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"namespace": "<string>"
}
],
"backups": {
"policy": "declared",
"enabled": true,
"vault": "<string>",
"schedule": "<string>"
},
"recorded_inputs_digest": "<string>",
"effects": [
"<string>"
],
"expires_at": "2023-11-07T05:31:56Z"
},
"digest": "<string>",
"state": "pending",
"created_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"confirmed_at": "2023-11-07T05:31:56Z",
"operation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"backup_observation": {
"state": "protected",
"reason": "<string>",
"last_complete_restore_point_at": "<string>",
"stale": true,
"not_capturing": true
},
"warnings": [
"<string>"
]
}Authorizations
Response
The confirmed upgrade.
One upgrade of a managed service, as its preparing actor sees it.