import requests
url = "https://api.platform.ankra.app/org/applications/{application_id}/overview-layout/versions"
payload = {
"content": "<string>",
"base_revision_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
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({content: '<string>', base_revision_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://api.platform.ankra.app/org/applications/{application_id}/overview-layout/versions', 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/applications/{application_id}/overview-layout/versions \
--header 'Content-Type: application/json' \
--cookie ankra_session= \
--data '
{
"content": "<string>",
"base_revision_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'{
"on_page": "ankra",
"revision": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"number": 2,
"content": "<string>",
"author_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"author_name": "<string>",
"created_at": "2023-11-07T05:31:56Z"
},
"versions": 1
}{
"detail": "<string>",
"error_code": "invalid_request"
}{
"detail": "<string>"
}{
"detail": "<string>",
"error_code": "canvas_revision_conflict",
"current_revision_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"layout": {
"on_page": "ankra",
"revision": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"number": 2,
"content": "<string>",
"author_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"author_name": "<string>",
"created_at": "2023-11-07T05:31:56Z"
},
"versions": 1
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Save an application's Overview layout (browser session)
Saves a version of the application’s Overview layout and puts it on the page. base_revision_id is the version the caller’s page showed, null for Ankra’s layout; when the Overview changed since, nothing is saved and the answer is 409 with what it shows now, so two saves at once never lose one silently. The layout is checked before it is saved: a canvas spec of schema_version 2, at most 65536 bytes and 64 cards, known summary cards only, and charts bound to this application’s datasets. Each save is audited on the application. Requires applications.write.
import requests
url = "https://api.platform.ankra.app/org/applications/{application_id}/overview-layout/versions"
payload = {
"content": "<string>",
"base_revision_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
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({content: '<string>', base_revision_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://api.platform.ankra.app/org/applications/{application_id}/overview-layout/versions', 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/applications/{application_id}/overview-layout/versions \
--header 'Content-Type: application/json' \
--cookie ankra_session= \
--data '
{
"content": "<string>",
"base_revision_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'{
"on_page": "ankra",
"revision": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"number": 2,
"content": "<string>",
"author_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"author_name": "<string>",
"created_at": "2023-11-07T05:31:56Z"
},
"versions": 1
}{
"detail": "<string>",
"error_code": "invalid_request"
}{
"detail": "<string>"
}{
"detail": "<string>",
"error_code": "canvas_revision_conflict",
"current_revision_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"layout": {
"on_page": "ankra",
"revision": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"number": 2,
"content": "<string>",
"author_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"author_name": "<string>",
"created_at": "2023-11-07T05:31:56Z"
},
"versions": 1
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Body
A version to save and put on the Overview.
The layout: a canvas spec of schema_version 2 as JSON text, at most 65536 bytes and 64 cards. A summary card is an ApplicationCard element with props.card one of health, environments, services, cost, safety, releases, runs, backups. A chart binds a dataset that takes an application parameter, with params.application set to this application's id, on a component that can draw it.
Response
The version is saved and on the page
What an application's Overview shows: Ankra's layout, which the page draws and Ankra does not store, or a version the team saved.