import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/metrics-tabs"
payload = {
"tabs": ["<string>"],
"base_version": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({tabs: ['<string>'], base_version: 123})
};
fetch('https://platform.ankra.app/api/v1/org/applications/{application_id}/metrics-tabs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PUT \
--url https://platform.ankra.app/api/v1/org/applications/{application_id}/metrics-tabs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tabs": [
"<string>"
],
"base_version": 123
}
'{
"tabs": [
{
"key": "<string>",
"kind": "ankra",
"dashboard_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>"
}
],
"ankra_order": true,
"left_out": 1,
"version": 2,
"updated_by": {
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"updated_at": "2023-11-07T05:31:56Z",
"last": {
"tab": "<string>",
"dashboard_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"detail": "<string>",
"error_code": "invalid_metrics_tabs"
}{
"detail": "<string>"
}{
"detail": "<string>",
"error_code": "metrics_tabs_conflict",
"current_version": 2,
"metrics_tabs": {
"tabs": [
{
"key": "<string>",
"kind": "ankra",
"dashboard_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>"
}
],
"ankra_order": true,
"left_out": 1,
"version": 2,
"updated_by": {
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"updated_at": "2023-11-07T05:31:56Z",
"last": {
"tab": "<string>",
"dashboard_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Arrange an application's Metrics tabs
Stores the order of the application’s Metrics tabs for everyone who opens it. base_version is the version the caller’s page showed, null only when nobody ever changed the tabs; when the tabs changed since, nothing is stored and the answer is 409 with the tabs as they are now. A dashboard tab must be a dashboard of this application shared with everyone in the organisation, so every reader of the application can open it. Each change is audited on the application. Requires applications.write.
import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/metrics-tabs"
payload = {
"tabs": ["<string>"],
"base_version": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({tabs: ['<string>'], base_version: 123})
};
fetch('https://platform.ankra.app/api/v1/org/applications/{application_id}/metrics-tabs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PUT \
--url https://platform.ankra.app/api/v1/org/applications/{application_id}/metrics-tabs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tabs": [
"<string>"
],
"base_version": 123
}
'{
"tabs": [
{
"key": "<string>",
"kind": "ankra",
"dashboard_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>"
}
],
"ankra_order": true,
"left_out": 1,
"version": 2,
"updated_by": {
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"updated_at": "2023-11-07T05:31:56Z",
"last": {
"tab": "<string>",
"dashboard_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"detail": "<string>",
"error_code": "invalid_metrics_tabs"
}{
"detail": "<string>"
}{
"detail": "<string>",
"error_code": "metrics_tabs_conflict",
"current_version": 2,
"metrics_tabs": {
"tabs": [
{
"key": "<string>",
"kind": "ankra",
"dashboard_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>"
}
],
"ankra_order": true,
"left_out": 1,
"version": 2,
"updated_by": {
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"updated_at": "2023-11-07T05:31:56Z",
"last": {
"tab": "<string>",
"dashboard_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Body
The order of the tabs of an application's Metrics, for everyone who opens it.
Response
The tabs are arranged; the answer is the tabs as the caller sees them now
The tabs of an application's Metrics as the caller sees them: Ankra's order, which the page draws, or the order someone arranged for everyone who opens the application.
The version of the last change to the tabs: the base_version of the next change. Going back to Ankra's order is a change like any other and counts the version on, so it stays set on Ankra's order after that. Null only when nobody ever changed the tabs.
x >= 1