# Resources

Cedana API for resources

## GET /v2/cluster/count

> Get clusters total count

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-staging"},"tags":[{"name":"Resources","description":"Cedana API for resources"}],"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"type":"http","scheme":"bearer"}},"schemas":{"TotalCountResponse":{"type":"object","required":["total_count"],"properties":{"total_count":{"type":"integer","format":"int64"}}},"ApiError":{"type":"object","description":"Standard error response for API endpoints","required":["message"],"properties":{"code":{"type":["string","null"],"description":"HTTP status code"},"details":{"description":"Optional additional error details"},"message":{"type":"string","description":"Error message describing what went wrong"}}}}},"paths":{"/v2/cluster/count":{"get":{"tags":["Resources"],"summary":"Get clusters total count","operationId":"clusters_count","responses":{"200":{"description":"Total count retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TotalCountResponse"}}}},"500":{"description":"Database error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}}}}
```

## GET /v2/jobs

> List jobs

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-staging"},"tags":[{"name":"Resources","description":"Cedana API for resources"}],"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"type":"http","scheme":"bearer"}},"schemas":{"JobResponse":{"type":"object","required":["id","name","namespace","status","age","monitored_by_policies","policy_count","pod_ids"],"properties":{"age":{"type":"string"},"completions":{"type":["integer","null"],"format":"int32"},"duration":{"type":["string","null"]},"id":{"type":"string","format":"uuid"},"monitored_by_policies":{"type":"array","items":{"type":"string"}},"name":{"type":"string"},"namespace":{"type":"string"},"pod_ids":{"type":"array","items":{"type":"string"}},"policy_count":{"type":"integer","format":"int64"},"priority":{"type":["integer","null"],"format":"int32"},"start_time":{"type":["string","null"]},"status":{"type":"string"}}},"ApiError":{"type":"object","description":"Standard error response for API endpoints","required":["message"],"properties":{"code":{"type":["string","null"],"description":"HTTP status code"},"details":{"description":"Optional additional error details"},"message":{"type":"string","description":"Error message describing what went wrong"}}}}},"paths":{"/v2/jobs":{"get":{"tags":["Resources"],"summary":"List jobs","operationId":"job_list","responses":{"200":{"description":"Returns jobs","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/JobResponse"}}}}},"500":{"description":"Failed to fetch from database","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}}}}
```

## GET /v2/jobs/count

> Get total count of jobs

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-staging"},"tags":[{"name":"Resources","description":"Cedana API for resources"}],"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"type":"http","scheme":"bearer"}},"schemas":{"TotalCountResponse":{"type":"object","required":["total_count"],"properties":{"total_count":{"type":"integer","format":"int64"}}},"ApiError":{"type":"object","description":"Standard error response for API endpoints","required":["message"],"properties":{"code":{"type":["string","null"],"description":"HTTP status code"},"details":{"description":"Optional additional error details"},"message":{"type":"string","description":"Error message describing what went wrong"}}}}},"paths":{"/v2/jobs/count":{"get":{"tags":["Resources"],"summary":"Get total count of jobs","operationId":"jobs_count","responses":{"200":{"description":"Total count retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TotalCountResponse"}}}},"500":{"description":"Database error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}}}}
```

## GET /v2/jobs/filter

>

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-staging"},"tags":[{"name":"Resources","description":"Cedana API for resources"}],"paths":{"/v2/jobs/filter":{"get":{"tags":["Resources"],"operationId":"jobs_filter","parameters":[{"name":"priority","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int32"}},{"name":"namespace","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"status","in":"query","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"description":"List of jobs with applied filters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilteredJobResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}}},"components":{"schemas":{"FilteredJobResponse":{"type":"object","required":["jobs","total_count","available_priorities"],"properties":{"available_priorities":{"type":"array","items":{"type":"integer","format":"int32"}},"jobs":{"type":"array","items":{"$ref":"#/components/schemas/JobFilterResponse"}},"total_count":{"type":"integer","format":"int64"}}},"JobFilterResponse":{"type":"object","required":["id","name","namespace","status","pod_count"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"namespace":{"type":"string"},"pod_count":{"type":"integer","format":"int64"},"priority":{"type":["integer","null"],"format":"int32"},"start_time":{"type":["string","null"]},"status":{"type":"string"}}},"ApiError":{"type":"object","description":"Standard error response for API endpoints","required":["message"],"properties":{"code":{"type":["string","null"],"description":"HTTP status code"},"details":{"description":"Optional additional error details"},"message":{"type":"string","description":"Error message describing what went wrong"}}}}}}
```

## GET /v2/jobs/namespaces

> Get job namespaces

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-staging"},"tags":[{"name":"Resources","description":"Cedana API for resources"}],"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"type":"http","scheme":"bearer"}},"schemas":{"NamespacesResponse":{"type":"object","required":["namespaces"],"properties":{"namespaces":{"type":"array","items":{"type":"string"}}}},"ApiError":{"type":"object","description":"Standard error response for API endpoints","required":["message"],"properties":{"code":{"type":["string","null"],"description":"HTTP status code"},"details":{"description":"Optional additional error details"},"message":{"type":"string","description":"Error message describing what went wrong"}}}}},"paths":{"/v2/jobs/namespaces":{"get":{"tags":["Resources"],"summary":"Get job namespaces","operationId":"job_namespaces","responses":{"200":{"description":"Available namespaces retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NamespacesResponse"}}}},"500":{"description":"Database error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}}}}
```

## GET /v2/jobs/paginated

> List jobs (paginated)

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-staging"},"tags":[{"name":"Resources","description":"Cedana API for resources"}],"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"type":"http","scheme":"bearer"}},"schemas":{"PaginatedJobResponse":{"type":"object","required":["jobs","total_count"],"properties":{"available_filters":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AvailableFilters"}]},"jobs":{"type":"array","items":{"$ref":"#/components/schemas/JobResponse"}},"total_count":{"type":"integer","format":"int64"}}},"AvailableFilters":{"type":"object","required":["statuses","namespaces"],"properties":{"namespaces":{"type":"array","items":{"type":"string"}},"statuses":{"type":"array","items":{"type":"string"}}}},"JobResponse":{"type":"object","required":["id","name","namespace","status","age","monitored_by_policies","policy_count","pod_ids"],"properties":{"age":{"type":"string"},"completions":{"type":["integer","null"],"format":"int32"},"duration":{"type":["string","null"]},"id":{"type":"string","format":"uuid"},"monitored_by_policies":{"type":"array","items":{"type":"string"}},"name":{"type":"string"},"namespace":{"type":"string"},"pod_ids":{"type":"array","items":{"type":"string"}},"policy_count":{"type":"integer","format":"int64"},"priority":{"type":["integer","null"],"format":"int32"},"start_time":{"type":["string","null"]},"status":{"type":"string"}}},"ApiError":{"type":"object","description":"Standard error response for API endpoints","required":["message"],"properties":{"code":{"type":["string","null"],"description":"HTTP status code"},"details":{"description":"Optional additional error details"},"message":{"type":"string","description":"Error message describing what went wrong"}}}}},"paths":{"/v2/jobs/paginated":{"get":{"tags":["Resources"],"summary":"List jobs (paginated)","operationId":"job_list_paginated","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int64"}},{"name":"offset","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int64"}},{"name":"sort","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"ascending","in":"query","required":false,"schema":{"type":["boolean","null"]}},{"name":"status","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"namespace","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"job_name","in":"query","description":"job name to query against (uses postgres ILIKE pattern search)","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"description":"Returns paginated jobs with total count and available filters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedJobResponse"}}}},"500":{"description":"Failed to fetch from database","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}}}}
```

## GET /v2/jobs/priorities

> Get available job priorities with counts

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-staging"},"tags":[{"name":"Resources","description":"Cedana API for resources"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{},"schemas":{"JobPrioritiesResponse":{"type":"object","required":["priorities","priority_counts"],"properties":{"priorities":{"type":"array","items":{"type":"integer","format":"int32"}},"priority_counts":{"type":"object","additionalProperties":{"type":"integer","format":"int64"},"propertyNames":{"type":"string"}}}},"ApiError":{"type":"object","description":"Standard error response for API endpoints","required":["message"],"properties":{"code":{"type":["string","null"],"description":"HTTP status code"},"details":{"description":"Optional additional error details"},"message":{"type":"string","description":"Error message describing what went wrong"}}}}},"paths":{"/v2/jobs/priorities":{"get":{"tags":["Resources"],"summary":"Get available job priorities with counts","operationId":"job_priorities","responses":{"200":{"description":"Job priorities retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobPrioritiesResponse"}}}},"500":{"description":"Database error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}}}}
```

## GET /v2/jobs/priority/{priority}

>

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-staging"},"tags":[{"name":"Resources","description":"Cedana API for resources"}],"paths":{"/v2/jobs/priority/{priority}":{"get":{"tags":["Resources"],"operationId":"jobs_by_priority","parameters":[{"name":"priority","in":"path","description":"Priority value to filter jobs by","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"List of jobs filtered by priority","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedJobResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}}},"components":{"schemas":{"PaginatedJobResponse":{"type":"object","required":["jobs","total_count"],"properties":{"available_filters":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AvailableFilters"}]},"jobs":{"type":"array","items":{"$ref":"#/components/schemas/JobResponse"}},"total_count":{"type":"integer","format":"int64"}}},"AvailableFilters":{"type":"object","required":["statuses","namespaces"],"properties":{"namespaces":{"type":"array","items":{"type":"string"}},"statuses":{"type":"array","items":{"type":"string"}}}},"JobResponse":{"type":"object","required":["id","name","namespace","status","age","monitored_by_policies","policy_count","pod_ids"],"properties":{"age":{"type":"string"},"completions":{"type":["integer","null"],"format":"int32"},"duration":{"type":["string","null"]},"id":{"type":"string","format":"uuid"},"monitored_by_policies":{"type":"array","items":{"type":"string"}},"name":{"type":"string"},"namespace":{"type":"string"},"pod_ids":{"type":"array","items":{"type":"string"}},"policy_count":{"type":"integer","format":"int64"},"priority":{"type":["integer","null"],"format":"int32"},"start_time":{"type":["string","null"]},"status":{"type":"string"}}},"ApiError":{"type":"object","description":"Standard error response for API endpoints","required":["message"],"properties":{"code":{"type":["string","null"],"description":"HTTP status code"},"details":{"description":"Optional additional error details"},"message":{"type":"string","description":"Error message describing what went wrong"}}}}}}
```

## GET /v2/jobs/statuses

> Get job statuses

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-staging"},"tags":[{"name":"Resources","description":"Cedana API for resources"}],"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"type":"http","scheme":"bearer"}},"schemas":{"StatusesResponse":{"type":"object","required":["statuses"],"properties":{"statuses":{"type":"array","items":{"type":"string"}}}},"ApiError":{"type":"object","description":"Standard error response for API endpoints","required":["message"],"properties":{"code":{"type":["string","null"],"description":"HTTP status code"},"details":{"description":"Optional additional error details"},"message":{"type":"string","description":"Error message describing what went wrong"}}}}},"paths":{"/v2/jobs/statuses":{"get":{"tags":["Resources"],"summary":"Get job statuses","operationId":"job_statuses","responses":{"200":{"description":"Available statuses retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusesResponse"}}}},"500":{"description":"Database error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}}}}
```

## GET /v2/jobs/{job\_id}/pods

>

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-staging"},"tags":[{"name":"Resources","description":"Cedana API for resources"}],"paths":{"/v2/jobs/{job_id}/pods":{"get":{"tags":["Resources"],"operationId":"job_pods","parameters":[{"name":"job_id","in":"path","description":"Job ID to get pods for","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"List of pods managed by the job","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobPodsResponse"}}}},"404":{"description":"Job not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}}},"components":{"schemas":{"JobPodsResponse":{"type":"object","required":["job_id","job_name","pods","total_count"],"properties":{"job_id":{"type":"string","format":"uuid"},"job_name":{"type":"string"},"pods":{"type":"array","items":{"$ref":"#/components/schemas/JobPodResponse"}},"total_count":{"type":"integer","format":"int64"}}},"JobPodResponse":{"type":"object","required":["id","name","namespace","status"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"namespace":{"type":"string"},"owner_reference":{"type":["string","null"]},"status":{"type":"string"}}},"ApiError":{"type":"object","description":"Standard error response for API endpoints","required":["message"],"properties":{"code":{"type":["string","null"],"description":"HTTP status code"},"details":{"description":"Optional additional error details"},"message":{"type":"string","description":"Error message describing what went wrong"}}}}}}
```

## List nodes

> Will only return nodes from clusters with status 'active' if no params are provided. Also, nodes\
> with last\_sync older than 5 minutes are not returned.

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-staging"},"tags":[{"name":"Resources","description":"Cedana API for resources"}],"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"type":"http","scheme":"bearer"}},"schemas":{"NodeResponse":{"type":"object","required":["id","name","status","cluster_name","compute_type","instance_type","region"],"properties":{"cluster_name":{"type":"string"},"compute_type":{"type":"string"},"id":{"type":"string","format":"uuid"},"instance_type":{"type":"string"},"name":{"type":"string"},"region":{"type":"string"},"status":{"type":"string"}}},"ApiError":{"type":"object","description":"Standard error response for API endpoints","required":["message"],"properties":{"code":{"type":["string","null"],"description":"HTTP status code"},"details":{"description":"Optional additional error details"},"message":{"type":"string","description":"Error message describing what went wrong"}}}}},"paths":{"/v2/nodes":{"get":{"tags":["Resources"],"summary":"List nodes","description":"Will only return nodes from clusters with status 'active' if no params are provided. Also, nodes\nwith last_sync older than 5 minutes are not returned.","operationId":"node_list","parameters":[{"name":"id","in":"query","required":false,"schema":{"type":["string","null"],"format":"uuid"}}],"responses":{"200":{"description":"Returns nodes","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/NodeResponse"}}}}},"500":{"description":"Failed to fetch from database","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}}}}
```

## GET /v2/nodes/count

> Get nodes total count

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-staging"},"tags":[{"name":"Resources","description":"Cedana API for resources"}],"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"type":"http","scheme":"bearer"}},"schemas":{"TotalCountResponse":{"type":"object","required":["total_count"],"properties":{"total_count":{"type":"integer","format":"int64"}}},"ApiError":{"type":"object","description":"Standard error response for API endpoints","required":["message"],"properties":{"code":{"type":["string","null"],"description":"HTTP status code"},"details":{"description":"Optional additional error details"},"message":{"type":"string","description":"Error message describing what went wrong"}}}}},"paths":{"/v2/nodes/count":{"get":{"tags":["Resources"],"summary":"Get nodes total count","operationId":"nodes_count","responses":{"200":{"description":"Total count retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TotalCountResponse"}}}},"500":{"description":"Database error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}}}}
```

## List pods

> Will not return pods with status 'deleted', and only from clusters with status 'active' and\
> pods belonging to nodes whose last\_sync is within the last 5 minutes.

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-staging"},"tags":[{"name":"Resources","description":"Cedana API for resources"}],"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"type":"http","scheme":"bearer"}},"schemas":{"PodResponse":{"type":"object","required":["id","name","namespace","status","age","ready","node","restarts","monitored_by_policies"],"properties":{"age":{"type":"string"},"id":{"type":"string","format":"uuid"},"monitored_by_policies":{"type":"array","items":{"type":"string"}},"name":{"type":"string"},"namespace":{"type":"string"},"node":{"type":"string"},"ready":{"type":"string"},"restarts":{"type":"integer","format":"int32"},"start_time":{"type":["string","null"]},"status":{"type":"string"}}},"ApiError":{"type":"object","description":"Standard error response for API endpoints","required":["message"],"properties":{"code":{"type":["string","null"],"description":"HTTP status code"},"details":{"description":"Optional additional error details"},"message":{"type":"string","description":"Error message describing what went wrong"}}}}},"paths":{"/v2/pods":{"get":{"tags":["Resources"],"summary":"List pods","description":"Will not return pods with status 'deleted', and only from clusters with status 'active' and\npods belonging to nodes whose last_sync is within the last 5 minutes.","operationId":"pod_list","parameters":[{"name":"id","in":"query","required":false,"schema":{"type":["string","null"],"format":"uuid"}}],"responses":{"200":{"description":"Returns pods","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PodResponse"}}}}},"500":{"description":"Failed to fetch from database","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}}}}
```

## GET /v2/pods/count

> Get total count of pods

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-staging"},"tags":[{"name":"Resources","description":"Cedana API for resources"}],"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"type":"http","scheme":"bearer"}},"schemas":{"TotalCountResponse":{"type":"object","required":["total_count"],"properties":{"total_count":{"type":"integer","format":"int64"}}},"ApiError":{"type":"object","description":"Standard error response for API endpoints","required":["message"],"properties":{"code":{"type":["string","null"],"description":"HTTP status code"},"details":{"description":"Optional additional error details"},"message":{"type":"string","description":"Error message describing what went wrong"}}}}},"paths":{"/v2/pods/count":{"get":{"tags":["Resources"],"summary":"Get total count of pods","operationId":"pods_count","responses":{"200":{"description":"Total count retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TotalCountResponse"}}}},"500":{"description":"Database error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}}}}
```

## GET /v2/pods/namespaces

> List pod namespaces

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-staging"},"tags":[{"name":"Resources","description":"Cedana API for resources"}],"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"type":"http","scheme":"bearer"}},"schemas":{"NamespacesResponse":{"type":"object","required":["namespaces"],"properties":{"namespaces":{"type":"array","items":{"type":"string"}}}},"ApiError":{"type":"object","description":"Standard error response for API endpoints","required":["message"],"properties":{"code":{"type":["string","null"],"description":"HTTP status code"},"details":{"description":"Optional additional error details"},"message":{"type":"string","description":"Error message describing what went wrong"}}}}},"paths":{"/v2/pods/namespaces":{"get":{"tags":["Resources"],"summary":"List pod namespaces","operationId":"pod_namespaces","responses":{"200":{"description":"Returns distinct pod namespaces","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NamespacesResponse"}}}},"500":{"description":"Failed to fetch from database","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}}}}
```

## GET /v2/pods/paginated

> List pods (paginated)

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-staging"},"tags":[{"name":"Resources","description":"Cedana API for resources"}],"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"type":"http","scheme":"bearer"}},"schemas":{"PaginatedPodResponse":{"type":"object","required":["pods","total_count"],"properties":{"available_filters":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AvailableFilters"}]},"pods":{"type":"array","items":{"$ref":"#/components/schemas/PodResponse"}},"total_count":{"type":"integer","format":"int64"}}},"AvailableFilters":{"type":"object","required":["statuses","namespaces"],"properties":{"namespaces":{"type":"array","items":{"type":"string"}},"statuses":{"type":"array","items":{"type":"string"}}}},"PodResponse":{"type":"object","required":["id","name","namespace","status","age","ready","node","restarts","monitored_by_policies"],"properties":{"age":{"type":"string"},"id":{"type":"string","format":"uuid"},"monitored_by_policies":{"type":"array","items":{"type":"string"}},"name":{"type":"string"},"namespace":{"type":"string"},"node":{"type":"string"},"ready":{"type":"string"},"restarts":{"type":"integer","format":"int32"},"start_time":{"type":["string","null"]},"status":{"type":"string"}}},"ApiError":{"type":"object","description":"Standard error response for API endpoints","required":["message"],"properties":{"code":{"type":["string","null"],"description":"HTTP status code"},"details":{"description":"Optional additional error details"},"message":{"type":"string","description":"Error message describing what went wrong"}}}}},"paths":{"/v2/pods/paginated":{"get":{"tags":["Resources"],"summary":"List pods (paginated)","operationId":"pod_list_paginated","parameters":[{"name":"id","in":"query","required":false,"schema":{"type":["string","null"],"format":"uuid"}},{"name":"limit","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int64"}},{"name":"offset","in":"query","required":false,"schema":{"type":["integer","null"],"format":"int64"}},{"name":"sort","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"ascending","in":"query","required":false,"schema":{"type":["boolean","null"]}},{"name":"status","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"namespace","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"pod_name","in":"query","description":"pod name to query against (uses postgres ILIKE pattern search)","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"description":"Returns paginated pods with total count and available filters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPodResponse"}}}},"500":{"description":"Failed to fetch from database","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}}}}
```

## GET /v2/pods/statuses

> List pod statuses

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-staging"},"tags":[{"name":"Resources","description":"Cedana API for resources"}],"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"type":"http","scheme":"bearer"}},"schemas":{"StatusesResponse":{"type":"object","required":["statuses"],"properties":{"statuses":{"type":"array","items":{"type":"string"}}}},"ApiError":{"type":"object","description":"Standard error response for API endpoints","required":["message"],"properties":{"code":{"type":["string","null"],"description":"HTTP status code"},"details":{"description":"Optional additional error details"},"message":{"type":"string","description":"Error message describing what went wrong"}}}}},"paths":{"/v2/pods/statuses":{"get":{"tags":["Resources"],"summary":"List pod statuses","operationId":"pod_statuses","responses":{"200":{"description":"Returns distinct pod statuses","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusesResponse"}}}},"500":{"description":"Failed to fetch from database","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cedana.ai/references/api/resources.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
