Put back an Overview layout version
import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/overview-layout/versions/{revision_id}/put-back"
payload = { "base_revision_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({base_revision_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://platform.ankra.app/api/v1/org/applications/{application_id}/overview-layout/versions/{revision_id}/put-back', 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/applications/{application_id}/overview-layout/versions/{revision_id}/put-back \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"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>"
}
]
}Applications
Put back an Overview layout version
Puts an earlier version of the application’s Overview layout back on the page, as a new version saved by the caller with the earlier one’s content; the earlier version stays as it was. The content is checked by today’s rules, so a version a rule now refuses answers 400. base_revision_id works as on a save (409 when the Overview changed since). Audited on the application. Requires applications.write.
POST
/
api
/
v1
/
org
/
applications
/
{application_id}
/
overview-layout
/
versions
/
{revision_id}
/
put-back
Put back an Overview layout version
import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/overview-layout/versions/{revision_id}/put-back"
payload = { "base_revision_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({base_revision_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://platform.ankra.app/api/v1/org/applications/{application_id}/overview-layout/versions/{revision_id}/put-back', 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/applications/{application_id}/overview-layout/versions/{revision_id}/put-back \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"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
Path Parameters
Body
application/json
Response
The earlier version's content is saved as a new version 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.