import requests
url = "https://platform.ankra.app/api/v1/org/cloud-cost/settings"
payload = {
"currency": "<string>",
"effective_discount_pct": 50
}
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({currency: '<string>', effective_discount_pct: 50})
};
fetch('https://platform.ankra.app/api/v1/org/cloud-cost/settings', 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/cloud-cost/settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"currency": "<string>",
"effective_discount_pct": 50
}
'{
"currency": "<string>",
"effective_discount_pct": 123,
"include_network_egress_estimate": true
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "Cluster not found"
}Update the cloud cost settings (bearer twin)
Sets the effective discount and the organisation default currency (ankra cost settings set). Gated on billing.manage; the token stands in for the browser route’s CSRF double-submit. Bearer-PAT twin of the browser route of the same name under /org; the console’s session cookie is not accepted here and the browser route answers a token with a login redirect.
import requests
url = "https://platform.ankra.app/api/v1/org/cloud-cost/settings"
payload = {
"currency": "<string>",
"effective_discount_pct": 50
}
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({currency: '<string>', effective_discount_pct: 50})
};
fetch('https://platform.ankra.app/api/v1/org/cloud-cost/settings', 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/cloud-cost/settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"currency": "<string>",
"effective_discount_pct": 50
}
'{
"currency": "<string>",
"effective_discount_pct": 123,
"include_network_egress_estimate": true
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "Cluster not found"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
PAT organisation override.
Body
Body of PUT /api/v1/org/cloud-cost/settings (ankra cost settings set): the organisation's default display currency and the effective discount applied on top of list prices.
Organisation default display currency; one of the platform's convertible currencies (usd, eur, gbp, sek, nok, dkk, chf, pln, czk, jpy, cad, aud, inr).
Committed-use / EDP proxy applied uniformly to every billed component, 0 to 100.
0 <= x <= 100