import requests
url = "https://platform.ankra.app/api/v1/clusters/{cluster_id}/provider-incidents"
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/{cluster_id}/provider-incidents', 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/{cluster_id}/provider-incidents \
--header 'Authorization: Bearer <token>'{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"provider": "<string>",
"provider_name": "<string>",
"feed_state": "ok",
"feed_reason": "",
"regions": [
"<string>"
],
"zones": [
"<string>"
],
"machines": 123,
"machines_without_recorded_zone": 123,
"open_incidents_on_pages": 123,
"feeds": [
{
"page": "<string>",
"state": "ok",
"reason": "<string>",
"fetched_at": "2023-11-07T05:31:56Z"
}
],
"incidents": [
{
"title": "<string>",
"status": "investigating",
"impact": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"posted_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"link": "<string>",
"page": "<string>",
"match": "zone",
"matched_location": "<string>",
"zone_unknown": true,
"components": [
"<string>"
]
}
],
"summary": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "Cluster not found"
}Get the cluster's provider incidents
Bearer PAT authentication. Reports the open incidents the cluster’s cloud provider lists on its own public status page for the cluster’s region and the zones its machines are in. Ankra reads the provider’s machine-readable status feed (OVH, UpCloud, DigitalOcean and Scaleway publish one) and caches it for a few minutes. A status page that cannot be read answers feed_state “unknown”, never an error, and an empty incident list then does not mean the provider reports nothing.
import requests
url = "https://platform.ankra.app/api/v1/clusters/{cluster_id}/provider-incidents"
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/{cluster_id}/provider-incidents', 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/{cluster_id}/provider-incidents \
--header 'Authorization: Bearer <token>'{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"provider": "<string>",
"provider_name": "<string>",
"feed_state": "ok",
"feed_reason": "",
"regions": [
"<string>"
],
"zones": [
"<string>"
],
"machines": 123,
"machines_without_recorded_zone": 123,
"open_incidents_on_pages": 123,
"feeds": [
{
"page": "<string>",
"state": "ok",
"reason": "<string>",
"fetched_at": "2023-11-07T05:31:56Z"
}
],
"incidents": [
{
"title": "<string>",
"status": "investigating",
"impact": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"posted_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"link": "<string>",
"page": "<string>",
"match": "zone",
"matched_location": "<string>",
"zone_unknown": true,
"components": [
"<string>"
]
}
],
"summary": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "Cluster not found"
}Authorizations
Response
Successful response
The open incidents a cluster's cloud provider reports on its own public status page for the cluster's region and the zones its machines are in.
"ok" when every status feed of the provider answered and they list at least one of the cluster's regions and zones, or an incident in one. "unknown" when one could not be read, the provider publishes none Ankra reads, the feeds list none of the cluster's regions and zones, Ankra has no region or zone recorded for the cluster, or the provider (or, for managed Kubernetes, the node placement) is not known: an empty incident list then does not mean the provider reports nothing.
ok, unknown