Resize the playground
import requests
url = "https://platform.ankra.app/api/v1/org/clusters/playground/{clusterId}/resize"
payload = { "plan": "<string>" }
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({plan: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/org/clusters/playground/{clusterId}/resize', 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/clusters/playground/{clusterId}/resize \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"plan": "<string>"
}
'{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"plan": {
"id": "<string>",
"display_name": "<string>",
"vcpus": 123,
"memory_gb": 123,
"storage_gb": 123,
"max_pods": 123,
"price_monthly_cents": 123,
"currency": "<string>",
"ordered_at": "<string>"
},
"provider": "<string>",
"restarts_server": true,
"message": "<string>",
"plan_change": {
"desired_plan": "<string>",
"requested_at": "<string>",
"failure": "<string>",
"message": "<string>"
}
}{
"detail": "<string>",
"error_code": "trial_keeps_its_size",
"action_url": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": "<string>",
"error_code": "payment_method_required",
"action_url": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}Playground
Resize the playground
Changes a paid playground to another paid size, or an Ankra Cloud playground’s server to another Ankra Cloud plan (which restarts the server). The same paid-order gates as ordering apply (403, 402). Requires clusters.write on the playground. An unknown plan, the same plan, or a trial answers 400 (an Ankra Cloud trial with error_code: trial_keeps_its_size); a size the memory budget or its volumes cannot fit 422; a playground not ready or a refused plan change 409; a full or unreachable host 503.
POST
/
api
/
v1
/
org
/
clusters
/
playground
/
{clusterId}
/
resize
Resize the playground
import requests
url = "https://platform.ankra.app/api/v1/org/clusters/playground/{clusterId}/resize"
payload = { "plan": "<string>" }
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({plan: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/org/clusters/playground/{clusterId}/resize', 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/clusters/playground/{clusterId}/resize \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"plan": "<string>"
}
'{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"plan": {
"id": "<string>",
"display_name": "<string>",
"vcpus": 123,
"memory_gb": 123,
"storage_gb": 123,
"max_pods": 123,
"price_monthly_cents": 123,
"currency": "<string>",
"ordered_at": "<string>"
},
"provider": "<string>",
"restarts_server": true,
"message": "<string>",
"plan_change": {
"desired_plan": "<string>",
"requested_at": "<string>",
"failure": "<string>",
"message": "<string>"
}
}{
"detail": "<string>",
"error_code": "trial_keeps_its_size",
"action_url": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": "<string>",
"error_code": "payment_method_required",
"action_url": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json
The size to move to (an Ankra Cloud plan id for an Ankra Cloud playground).