List Pods Endpoint
import requests
url = "https://platform.ankra.app/api/v1/clusters/{cluster_id}/kubernetes/pods"
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}/kubernetes/pods', 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}/kubernetes/pods \
--header 'Authorization: Bearer <token>'{
"cache_info": {
"served_from_cache": true,
"staleness_seconds": 123,
"sync_status": "<string>",
"warning": "<string>"
},
"namespaces": [
"<string>"
],
"page": 123,
"page_size": 123,
"pods": [
{
"last_restart_time": "<string>",
"name": "<string>",
"namespace": "<string>",
"node_name": "<string>",
"nominated_node_name": "<string>",
"phase": "<string>",
"pod_ip": "<string>",
"readiness_gates": "<string>",
"ready": "<string>",
"restarts": 123,
"start_time": "<string>",
"uid": "<string>"
}
],
"total_count": 123,
"total_pages": 123
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Kubernetes
List Pods Endpoint
GET
/
api
/
v1
/
clusters
/
{cluster_id}
/
kubernetes
/
pods
List Pods Endpoint
import requests
url = "https://platform.ankra.app/api/v1/clusters/{cluster_id}/kubernetes/pods"
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}/kubernetes/pods', 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}/kubernetes/pods \
--header 'Authorization: Bearer <token>'{
"cache_info": {
"served_from_cache": true,
"staleness_seconds": 123,
"sync_status": "<string>",
"warning": "<string>"
},
"namespaces": [
"<string>"
],
"page": 123,
"page_size": 123,
"pods": [
{
"last_restart_time": "<string>",
"name": "<string>",
"namespace": "<string>",
"node_name": "<string>",
"nominated_node_name": "<string>",
"phase": "<string>",
"pod_ip": "<string>",
"readiness_gates": "<string>",
"ready": "<string>",
"restarts": 123,
"start_time": "<string>",
"uid": "<string>"
}
],
"total_count": 123,
"total_pages": 123
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Query Parameters
Required range:
x >= 1Required range:
1 <= x <= 100Maximum string length:
253Maximum string length:
253Maximum string length:
253Maximum string length:
50Maximum string length:
10