Skip to main content
POST
/
api
/
v1
/
clusters
/
{cluster_id}
/
kubernetes
/
metrics
/
query
Query Prometheus Instant Endpoint
import requests

url = "https://platform.ankra.app/api/v1/clusters/{cluster_id}/kubernetes/metrics/query"

payload = { "query": "<string>" }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
{
  "status": "<string>",
  "result_type": "<string>",
  "result": [
    "<unknown>"
  ],
  "total_series": 0,
  "truncated": false
}

Authorizations

Authorization
string
header
required

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

Headers

authorization
string | null
x-ankra-organisation-id
string | null

Path Parameters

cluster_id
string<uuid4>
required

Body

application/json
query
string
required
timeout_seconds
number | null

Response

Successful Response

status
string
required
result_type
string | null
result
any[]
total_series
integer
default:0
truncated
boolean
default:false