Skip to main content
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)
{
  "pods": [
    {
      "uid": "<string>",
      "name": "<string>",
      "namespace": "<string>",
      "phase": "<string>",
      "ready": "<string>",
      "restarts": 123,
      "last_restart_time": "<string>",
      "start_time": "<string>",
      "pod_ip": "<string>",
      "node_name": "<string>",
      "nominated_node_name": "<string>",
      "readiness_gates": "<string>"
    }
  ],
  "total_count": 123,
  "page": 123,
  "page_size": 123,
  "total_pages": 123,
  "cache_info": {
    "served_from_cache": true,
    "staleness_seconds": 123,
    "sync_status": "<string>",
    "warning": "<string>"
  },
  "namespaces": [
    "<string>"
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

authorization
string | null

Path Parameters

cluster_id
string<uuid4>
required

Query Parameters

page
integer
default:1
Required range: x >= 1
page_size
integer
default:25
Required range: 1 <= x <= 100
namespace
string | null
Maximum string length: 253
namespaces
string[] | null
name_contains
string | null
Maximum string length: 253
node_name
string | null
Maximum string length: 253
sort_by
string | null
Maximum string length: 50
sort_direction
string | null
Maximum string length: 10

Response

Successful Response

pods
PodSummary · object[]
required
total_count
integer
required
page
integer
required
page_size
integer
required
total_pages
integer
required
cache_info
CacheInfo · object
required
namespaces
string[]
required