import requests
url = "https://api.platform.ankra.app/org/stack-profiles/drafts/{draft_id}/publish"
payload = {
"channel": "stable",
"changelog": "<string>",
"share_organisation_slugs": ["<string>"],
"version": 123,
"approved_summary_revision": 2
}
headers = {
"cookie": "ankra_session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'ankra_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({
channel: 'stable',
changelog: '<string>',
share_organisation_slugs: ['<string>'],
version: 123,
approved_summary_revision: 2
})
};
fetch('https://api.platform.ankra.app/org/stack-profiles/drafts/{draft_id}/publish', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.platform.ankra.app/org/stack-profiles/drafts/{draft_id}/publish \
--header 'Content-Type: application/json' \
--cookie ankra_session= \
--data '
{
"channel": "stable",
"changelog": "<string>",
"share_organisation_slugs": [
"<string>"
],
"version": 123,
"approved_summary_revision": 2
}
'{
"profile": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"logo_url": "<string>",
"has_uploaded_logo": true,
"uploaded_logo_updated_at": "2023-11-07T05:31:56Z",
"category": "<string>",
"tags": [
"<string>"
],
"visibility": "organisation",
"latest_version": 123,
"current_version": 123,
"source_cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_by_user_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"publisher_name": "<string>",
"publisher_slug": "<string>",
"publisher_verified": true,
"publisher_is_ankra": true,
"publisher_has_logo": true,
"publisher_logo_updated_at": "2023-11-07T05:31:56Z",
"shared_organisation_count": 123,
"shared_with_you": true,
"is_owner": true
},
"version": {},
"warnings": [
"<string>"
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Publish a stack profile draft (browser session)
Publishes the final normalized configuration atomically. Omit approved_summary_revision to publish without a summary. When attaching an approval, version and approved_summary_revision must be explicit positive integers; source identity, current authority and approval are rechecked under the publication locks. A mismatch returns 409 without creating a version or consuming the draft. No request may supply snapshots, source digests or approval identity. A 503 outcome is uncertain: reload the draft and versions before retrying.
import requests
url = "https://api.platform.ankra.app/org/stack-profiles/drafts/{draft_id}/publish"
payload = {
"channel": "stable",
"changelog": "<string>",
"share_organisation_slugs": ["<string>"],
"version": 123,
"approved_summary_revision": 2
}
headers = {
"cookie": "ankra_session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'ankra_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({
channel: 'stable',
changelog: '<string>',
share_organisation_slugs: ['<string>'],
version: 123,
approved_summary_revision: 2
})
};
fetch('https://api.platform.ankra.app/org/stack-profiles/drafts/{draft_id}/publish', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.platform.ankra.app/org/stack-profiles/drafts/{draft_id}/publish \
--header 'Content-Type: application/json' \
--cookie ankra_session= \
--data '
{
"channel": "stable",
"changelog": "<string>",
"share_organisation_slugs": [
"<string>"
],
"version": 123,
"approved_summary_revision": 2
}
'{
"profile": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"logo_url": "<string>",
"has_uploaded_logo": true,
"uploaded_logo_updated_at": "2023-11-07T05:31:56Z",
"category": "<string>",
"tags": [
"<string>"
],
"visibility": "organisation",
"latest_version": 123,
"current_version": 123,
"source_cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_by_user_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"publisher_name": "<string>",
"publisher_slug": "<string>",
"publisher_verified": true,
"publisher_is_ankra": true,
"publisher_has_logo": true,
"publisher_logo_updated_at": "2023-11-07T05:31:56Z",
"shared_organisation_count": 123,
"shared_with_you": true,
"is_owner": true
},
"version": {},
"warnings": [
"<string>"
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Browser session. Mutations also require X-Ankra-CSRF.
Path Parameters
Body
organisation, public, null 50Optimistic draft version; required and positive for summary attachment.
Exact current approval-pointer revision of this draft; omission leaves the new version without a summary.
x >= 1