OpenapiO11y
Lists Kubernetes pods over a time range, each with its CPU and memory usage…
Lists Kubernetes pods over a time range, each with its CPU and memory usage against request and limit, restart count, phase counts and attributes;…
POST /v1/o11y/pods/list
| Address | https://api.hanzo.ai/v1/o11y/pods/list |
| Method | POST |
| Operation | post_o11y_pods_list |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Lists Kubernetes pods over a time range, each with its CPU and memory usage against request and limit, restart count, phase counts and attributes; filterable, groupable and paginated.
Request
24 fields, body application/json (required).
| Field | In | Type | Required | Description |
|---|---|---|---|---|
end | body | integer | — | epoch time in ms |
filters | body | o11y.FilterSet | — | |
filters.items | body | o11y.FilterItem[] | — | |
filters.items[].key | body | o11y.AttributeKey | — | |
filters.items[].key.dataType | body | string | — | |
filters.items[].key.isColumn | body | boolean | — | |
filters.items[].key.isJSON | body | boolean | — | |
filters.items[].key.key | body | string | — | |
filters.items[].key.type | body | string | — | |
filters.items[].op | body | string | — | |
filters.items[].value | body | object | — | |
filters.op | body | string | — | |
groupBy | body | o11y.AttributeKey[] | — | |
groupBy[].dataType | body | string | — | |
groupBy[].isColumn | body | boolean | — | |
groupBy[].isJSON | body | boolean | — | |
groupBy[].key | body | string | — | |
groupBy[].type | body | string | — | |
limit | body | integer | — | |
offset | body | integer | — | |
orderBy | body | o11y.OrderBy | — | |
orderBy.columnName | body | string | — | |
orderBy.order | body | string | — | |
start | body | integer | — | epoch time in ms |
Response
| Status | Body | Meaning |
|---|---|---|
200 | o11y.O11yPodListOut | ok |
200 body — 21 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
data | body | o11y.PodListResponse | — | |
data.records | body | o11y.PodListRecord[] | — | |
data.records[].countByPhase | body | o11y.PodCountByPhase | — | |
data.records[].countByPhase.failed | body | integer | — | |
data.records[].countByPhase.pending | body | integer | — | |
data.records[].countByPhase.running | body | integer | — | |
data.records[].countByPhase.succeeded | body | integer | — | |
data.records[].countByPhase.unknown | body | integer | — | |
data.records[].meta | body | object | — | |
data.records[].meta.* | body | string | — | |
data.records[].podCPU | body | number | — | |
data.records[].podCPULimit | body | number | — | |
data.records[].podCPURequest | body | number | — | |
data.records[].podMemory | body | number | — | |
data.records[].podMemoryLimit | body | number | — | |
data.records[].podMemoryRequest | body | number | — | |
data.records[].podUID | body | string | — | |
data.records[].restartCount | body | integer | — | |
data.total | body | integer | — | |
data.type | body | string | — | |
status | body | string | — | Status is "success". |
Failure carries the platform error shape — see Errors.
Examples
hanzo o11y pods listimport { Configuration, O11yApi } from 'hanzoai';
const api = new O11yApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.postO11yPodsList({ end: 0, filters: {"items":[{"key":{"dataType":null,"isColumn":null,"isJSON":null,"key":null},"op":"<op>","value":{}}],"op":"<op>"} });from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import O11yApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = O11yApi(client).post_o11y_pods_list(end=0, filters={"items":[{"key":{"dataType":null,"isColumn":null,"isJSON":null,"key":null},"op":"<op>","value":{}}],"op":"<op>"})cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.O11yAPI.PostO11yPodsList(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::apis::{configuration::Configuration, o11y_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = o11y_api::post_o11y_pods_list(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.O11yApi;
ApiClient client = new ApiClient();
client.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + System.getenv("HANZO_API_KEY")));
var result = new O11yApi(client).postO11yPodsList();curl -X POST https://api.hanzo.ai/v1/o11y/pods/list \
-H "Authorization: Bearer $HANZO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"end": 0,
"filters": {
"items": [
{
"key": {
"dataType": null,
"isColumn": null,
"isJSON": null,
"key": null
},
"op": "<op>",
"value": {}
}
],
"op": "<op>"
}
}'The door reaches o11y through the o11y tool, which names its 340 operations with its own verbs — this one among them, under a name only the door declares. describe explains any of them:
curl -X POST https://api.hanzo.ai/v1/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "describe",
"arguments": {
"op": "get_o11y_alert_last"
}
}
}'How is this guide?