import requests
url = "https://platform.ankra.app/api/v1/clusters/creation-estimate"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/clusters/creation-estimate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/clusters/creation-estimate \
--header 'Authorization: Bearer <token>'{
"status": "available",
"window_days": 90,
"history_limited": true,
"basis": "organisation_matching_configuration",
"typical_seconds": 2,
"slow_seconds": 2,
"samples": 1
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Estimate a draft cluster's setup time
How long a draft self-managed cluster’s setup is expected to take, read before the cluster exists, from the setup durations of earlier clusters over 90 days: the time from a cluster’s creation to the last task of its first setup run, counted only when that run started within an hour and everything in it succeeded. The organisation’s own clusters with the same provider, location, distribution and control planes and workers of the same instance types answer when at least five match (basis organisation_matching_configuration, with samples). Otherwise every organisation’s clusters with the same provider, distribution and node counts answer when they hold at least ten runs from at least three organisations (basis platform_matching_shape, without samples). Otherwise the status is insufficient_history with the organisation’s own count. A read that fails answers 200 with status unavailable. Requires clusters.read.
import requests
url = "https://platform.ankra.app/api/v1/clusters/creation-estimate"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/clusters/creation-estimate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/clusters/creation-estimate \
--header 'Authorization: Bearer <token>'{
"status": "available",
"window_days": 90,
"history_limited": true,
"basis": "organisation_matching_configuration",
"typical_seconds": 2,
"slow_seconds": 2,
"samples": 1
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Query Parameters
Response
Successful Response
Expected setup time of a draft self-managed cluster. status available carries typical_seconds and slow_seconds; insufficient_history is a successful read with too few comparable runs; unavailable is a read that failed and says nothing about the history. samples is the organisation's own count of matching runs, present only for basis organisation_matching_configuration when the read succeeded; the platform basis never carries a count.