> For the complete documentation index, see [llms.txt](https://docs.cedana.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cedana.ai/references/api/resources.md).

# Resources

Cedana API for resources

## GET /v1/cluster/count

> Get clusters total count

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-dev"},"tags":[{"description":"Cedana API for resources","name":"Resources"}],"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"scheme":"bearer","type":"http"}},"schemas":{"TotalCountResponse":{"properties":{"total_count":{"format":"int64","type":"integer"}},"required":["total_count"],"type":"object"},"HttpError":{"description":"Standard JSON error body for all 4xx/5xx responses.\n\nHandlers return plain-text errors internally; [`normalize_error_response`]\nconverts anything the stack produces (handlers, extractors, the auth layer)\nto this shape, so generated SDK clients can rely on a single error schema.","properties":{"message":{"description":"Human-readable description of what went wrong","type":"string"}},"required":["message"],"type":"object"}}},"paths":{"/v1/cluster/count":{"get":{"operationId":"clusters_count","parameters":[{"in":"query","name":"status","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TotalCountResponse"}}},"description":"Total count retrieved successfully"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Database error"},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Client error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Server error"}},"summary":"Get clusters total count","tags":["Resources"]}}}}
```

## GET /v1/jobs

> List jobs

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-dev"},"tags":[{"description":"Cedana API for resources","name":"Resources"}],"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"scheme":"bearer","type":"http"}},"schemas":{"JobResponse":{"properties":{"age":{"type":"string"},"completions":{"type":["string","null"]},"duration":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"monitored_by_policies":{"items":{"type":"string"},"type":"array"},"name":{"type":"string"},"namespace":{"type":"string"},"pod_count":{"format":"int32","type":["integer","null"]},"pod_ids":{"items":{"type":"string"},"type":"array"},"policy_count":{"format":"int32","type":["integer","null"]},"priority":{"format":"int32","type":["integer","null"]},"startTime":{"type":["string","null"]},"status":{"type":"string"}},"required":["id","name","namespace","status","age","monitored_by_policies","pod_ids"],"type":"object"},"HttpError":{"description":"Standard JSON error body for all 4xx/5xx responses.\n\nHandlers return plain-text errors internally; [`normalize_error_response`]\nconverts anything the stack produces (handlers, extractors, the auth layer)\nto this shape, so generated SDK clients can rely on a single error schema.","properties":{"message":{"description":"Human-readable description of what went wrong","type":"string"}},"required":["message"],"type":"object"}}},"paths":{"/v1/jobs":{"get":{"operationId":"job_list","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/JobResponse"},"type":"array"}}},"description":"Returns jobs"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Failed to fetch from database"},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Client error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Server error"}},"summary":"List jobs","tags":["Resources"]}}}}
```

## GET /v1/jobs/by-priority/{priority}

>

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-dev"},"tags":[{"description":"Cedana API for resources","name":"Resources"}],"paths":{"/v1/jobs/by-priority/{priority}":{"get":{"operationId":"jobs_by_priority","parameters":[{"description":"Priority value to filter jobs by","in":"path","name":"priority","required":true,"schema":{"format":"int32","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedJobResponse"}}},"description":"List of jobs filtered by priority"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Internal server error"},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Client error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Server error"}},"tags":["Resources"]}}},"components":{"schemas":{"PaginatedJobResponse":{"properties":{"available_filters":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AvailableFilters"}]},"jobs":{"items":{"$ref":"#/components/schemas/JobResponse"},"type":"array"},"total_count":{"format":"int64","type":"integer"}},"required":["jobs","total_count"],"type":"object"},"AvailableFilters":{"properties":{"namespaces":{"items":{"type":"string"},"type":"array"},"statuses":{"items":{"type":"string"},"type":"array"}},"required":["statuses","namespaces"],"type":"object"},"JobResponse":{"properties":{"age":{"type":"string"},"completions":{"type":["string","null"]},"duration":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"monitored_by_policies":{"items":{"type":"string"},"type":"array"},"name":{"type":"string"},"namespace":{"type":"string"},"pod_count":{"format":"int32","type":["integer","null"]},"pod_ids":{"items":{"type":"string"},"type":"array"},"policy_count":{"format":"int32","type":["integer","null"]},"priority":{"format":"int32","type":["integer","null"]},"startTime":{"type":["string","null"]},"status":{"type":"string"}},"required":["id","name","namespace","status","age","monitored_by_policies","pod_ids"],"type":"object"},"HttpError":{"description":"Standard JSON error body for all 4xx/5xx responses.\n\nHandlers return plain-text errors internally; [`normalize_error_response`]\nconverts anything the stack produces (handlers, extractors, the auth layer)\nto this shape, so generated SDK clients can rely on a single error schema.","properties":{"message":{"description":"Human-readable description of what went wrong","type":"string"}},"required":["message"],"type":"object"}}}}
```

## GET /v1/jobs/count

> Get total count of jobs

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-dev"},"tags":[{"description":"Cedana API for resources","name":"Resources"}],"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"scheme":"bearer","type":"http"}},"schemas":{"TotalCountResponse":{"properties":{"total_count":{"format":"int64","type":"integer"}},"required":["total_count"],"type":"object"},"HttpError":{"description":"Standard JSON error body for all 4xx/5xx responses.\n\nHandlers return plain-text errors internally; [`normalize_error_response`]\nconverts anything the stack produces (handlers, extractors, the auth layer)\nto this shape, so generated SDK clients can rely on a single error schema.","properties":{"message":{"description":"Human-readable description of what went wrong","type":"string"}},"required":["message"],"type":"object"}}},"paths":{"/v1/jobs/count":{"get":{"operationId":"jobs_count","parameters":[{"in":"query","name":"status","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TotalCountResponse"}}},"description":"Total count retrieved successfully"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Database error"},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Client error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Server error"}},"summary":"Get total count of jobs","tags":["Resources"]}}}}
```

## GET /v1/jobs/filter

>

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-dev"},"tags":[{"description":"Cedana API for resources","name":"Resources"}],"paths":{"/v1/jobs/filter":{"get":{"operationId":"jobs_filter","parameters":[{"in":"query","name":"priority","required":false,"schema":{"format":"int32","type":["integer","null"]}},{"in":"query","name":"namespace","required":false,"schema":{"type":["string","null"]}},{"in":"query","name":"status","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilteredJobResponse"}}},"description":"List of jobs with applied filters"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Internal server error"},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Client error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Server error"}},"tags":["Resources"]}}},"components":{"schemas":{"FilteredJobResponse":{"properties":{"available_priorities":{"items":{"format":"int32","type":"integer"},"type":"array"},"jobs":{"items":{"$ref":"#/components/schemas/JobFilterResponse"},"type":"array"},"total_count":{"format":"int64","type":"integer"}},"required":["jobs","total_count","available_priorities"],"type":"object"},"JobFilterResponse":{"properties":{"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"namespace":{"type":"string"},"pod_count":{"format":"int64","type":"integer"},"priority":{"format":"int32","type":["integer","null"]},"start_time":{"type":["string","null"]},"status":{"type":"string"}},"required":["id","name","namespace","status","pod_count"],"type":"object"},"HttpError":{"description":"Standard JSON error body for all 4xx/5xx responses.\n\nHandlers return plain-text errors internally; [`normalize_error_response`]\nconverts anything the stack produces (handlers, extractors, the auth layer)\nto this shape, so generated SDK clients can rely on a single error schema.","properties":{"message":{"description":"Human-readable description of what went wrong","type":"string"}},"required":["message"],"type":"object"}}}}
```

## GET /v1/jobs/namespaces

> Get job namespaces

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-dev"},"tags":[{"description":"Cedana API for resources","name":"Resources"}],"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"scheme":"bearer","type":"http"}},"schemas":{"NamespacesResponse":{"properties":{"namespaces":{"items":{"type":"string"},"type":"array"}},"required":["namespaces"],"type":"object"},"HttpError":{"description":"Standard JSON error body for all 4xx/5xx responses.\n\nHandlers return plain-text errors internally; [`normalize_error_response`]\nconverts anything the stack produces (handlers, extractors, the auth layer)\nto this shape, so generated SDK clients can rely on a single error schema.","properties":{"message":{"description":"Human-readable description of what went wrong","type":"string"}},"required":["message"],"type":"object"}}},"paths":{"/v1/jobs/namespaces":{"get":{"operationId":"job_namespaces","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NamespacesResponse"}}},"description":"Available namespaces retrieved successfully"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Database error"},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Client error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Server error"}},"summary":"Get job namespaces","tags":["Resources"]}}}}
```

## GET /v1/jobs/paginated

> List jobs (paginated)

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-dev"},"tags":[{"description":"Cedana API for resources","name":"Resources"}],"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"scheme":"bearer","type":"http"}},"schemas":{"PaginatedJobResponse":{"properties":{"available_filters":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AvailableFilters"}]},"jobs":{"items":{"$ref":"#/components/schemas/JobResponse"},"type":"array"},"total_count":{"format":"int64","type":"integer"}},"required":["jobs","total_count"],"type":"object"},"AvailableFilters":{"properties":{"namespaces":{"items":{"type":"string"},"type":"array"},"statuses":{"items":{"type":"string"},"type":"array"}},"required":["statuses","namespaces"],"type":"object"},"JobResponse":{"properties":{"age":{"type":"string"},"completions":{"type":["string","null"]},"duration":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"monitored_by_policies":{"items":{"type":"string"},"type":"array"},"name":{"type":"string"},"namespace":{"type":"string"},"pod_count":{"format":"int32","type":["integer","null"]},"pod_ids":{"items":{"type":"string"},"type":"array"},"policy_count":{"format":"int32","type":["integer","null"]},"priority":{"format":"int32","type":["integer","null"]},"startTime":{"type":["string","null"]},"status":{"type":"string"}},"required":["id","name","namespace","status","age","monitored_by_policies","pod_ids"],"type":"object"},"HttpError":{"description":"Standard JSON error body for all 4xx/5xx responses.\n\nHandlers return plain-text errors internally; [`normalize_error_response`]\nconverts anything the stack produces (handlers, extractors, the auth layer)\nto this shape, so generated SDK clients can rely on a single error schema.","properties":{"message":{"description":"Human-readable description of what went wrong","type":"string"}},"required":["message"],"type":"object"}}},"paths":{"/v1/jobs/paginated":{"get":{"operationId":"job_list_paginated","parameters":[{"in":"query","name":"limit","required":false,"schema":{"format":"int64","type":["integer","null"]}},{"in":"query","name":"offset","required":false,"schema":{"format":"int64","type":["integer","null"]}},{"in":"query","name":"sort","required":false,"schema":{"type":["string","null"]}},{"in":"query","name":"ascending","required":false,"schema":{"type":["boolean","null"]}},{"in":"query","name":"status","required":false,"schema":{"type":["string","null"]}},{"in":"query","name":"namespace","required":false,"schema":{"type":["string","null"]}},{"description":"job name to query against (uses postgres ILIKE pattern search)","in":"query","name":"job_name","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedJobResponse"}}},"description":"Returns paginated jobs with total count and available filters"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Failed to fetch from database"},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Client error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Server error"}},"summary":"List jobs (paginated)","tags":["Resources"]}}}}
```

## GET /v1/jobs/priorities

> Get available job priorities with counts

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-dev"},"tags":[{"description":"Cedana API for resources","name":"Resources"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{},"schemas":{"JobPrioritiesResponse":{"properties":{"priorities":{"items":{"format":"int32","type":"integer"},"type":"array"},"priority_counts":{"additionalProperties":{"format":"int64","type":"integer"},"propertyNames":{"type":"string"},"type":"object"}},"required":["priorities","priority_counts"],"type":"object"},"HttpError":{"description":"Standard JSON error body for all 4xx/5xx responses.\n\nHandlers return plain-text errors internally; [`normalize_error_response`]\nconverts anything the stack produces (handlers, extractors, the auth layer)\nto this shape, so generated SDK clients can rely on a single error schema.","properties":{"message":{"description":"Human-readable description of what went wrong","type":"string"}},"required":["message"],"type":"object"}}},"paths":{"/v1/jobs/priorities":{"get":{"operationId":"job_priorities","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobPrioritiesResponse"}}},"description":"Job priorities retrieved successfully"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Database error"},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Client error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Server error"}},"summary":"Get available job priorities with counts","tags":["Resources"]}}}}
```

## GET /v1/jobs/statuses

> Get job statuses

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-dev"},"tags":[{"description":"Cedana API for resources","name":"Resources"}],"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"scheme":"bearer","type":"http"}},"schemas":{"StatusesResponse":{"properties":{"statuses":{"items":{"type":"string"},"type":"array"}},"required":["statuses"],"type":"object"},"HttpError":{"description":"Standard JSON error body for all 4xx/5xx responses.\n\nHandlers return plain-text errors internally; [`normalize_error_response`]\nconverts anything the stack produces (handlers, extractors, the auth layer)\nto this shape, so generated SDK clients can rely on a single error schema.","properties":{"message":{"description":"Human-readable description of what went wrong","type":"string"}},"required":["message"],"type":"object"}}},"paths":{"/v1/jobs/statuses":{"get":{"operationId":"job_statuses","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusesResponse"}}},"description":"Available statuses retrieved successfully"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Database error"},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Client error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Server error"}},"summary":"Get job statuses","tags":["Resources"]}}}}
```

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

>

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-dev"},"tags":[{"description":"Cedana API for resources","name":"Resources"}],"paths":{"/v1/jobs/{job_id}/pods":{"get":{"operationId":"job_pods","parameters":[{"description":"Job ID to get pods for","in":"path","name":"job_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobPodsResponse"}}},"description":"List of pods managed by the job"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Job not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Internal server error"},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Client error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Server error"}},"tags":["Resources"]}}},"components":{"schemas":{"JobPodsResponse":{"properties":{"job_id":{"format":"uuid","type":"string"},"job_name":{"type":"string"},"pods":{"items":{"$ref":"#/components/schemas/JobPodResponse"},"type":"array"},"total_count":{"format":"int64","type":"integer"}},"required":["job_id","job_name","pods","total_count"],"type":"object"},"JobPodResponse":{"properties":{"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"namespace":{"type":"string"},"owner_reference":{"type":["string","null"]},"status":{"type":"string"}},"required":["id","name","namespace","status"],"type":"object"},"HttpError":{"description":"Standard JSON error body for all 4xx/5xx responses.\n\nHandlers return plain-text errors internally; [`normalize_error_response`]\nconverts anything the stack produces (handlers, extractors, the auth layer)\nto this shape, so generated SDK clients can rely on a single error schema.","properties":{"message":{"description":"Human-readable description of what went wrong","type":"string"}},"required":["message"],"type":"object"}}}}
```

## 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-dev"},"tags":[{"description":"Cedana API for resources","name":"Resources"}],"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"scheme":"bearer","type":"http"}},"schemas":{"NodeResponse":{"properties":{"capacity_type":{"description":"\"spot\" or \"on-demand\" - detected from node labels","type":"string"},"cluster_name":{"type":"string"},"compute_type":{"type":"string"},"id":{"format":"uuid","type":"string"},"instance_type":{"type":"string"},"name":{"type":"string"},"region":{"type":"string"},"status":{"type":"string"}},"required":["id","name","status","cluster_name","compute_type","instance_type","region","capacity_type"],"type":"object"},"HttpError":{"description":"Standard JSON error body for all 4xx/5xx responses.\n\nHandlers return plain-text errors internally; [`normalize_error_response`]\nconverts anything the stack produces (handlers, extractors, the auth layer)\nto this shape, so generated SDK clients can rely on a single error schema.","properties":{"message":{"description":"Human-readable description of what went wrong","type":"string"}},"required":["message"],"type":"object"}}},"paths":{"/v1/nodes":{"get":{"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":[{"in":"query","name":"id","required":false,"schema":{"format":"uuid","type":["string","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/NodeResponse"},"type":"array"}}},"description":"Returns nodes"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Failed to fetch from database"},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Client error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Server error"}},"summary":"List nodes","tags":["Resources"]}}}}
```

## GET /v1/nodes/count

> Get nodes total count

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-dev"},"tags":[{"description":"Cedana API for resources","name":"Resources"}],"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"scheme":"bearer","type":"http"}},"schemas":{"TotalCountResponse":{"properties":{"total_count":{"format":"int64","type":"integer"}},"required":["total_count"],"type":"object"},"HttpError":{"description":"Standard JSON error body for all 4xx/5xx responses.\n\nHandlers return plain-text errors internally; [`normalize_error_response`]\nconverts anything the stack produces (handlers, extractors, the auth layer)\nto this shape, so generated SDK clients can rely on a single error schema.","properties":{"message":{"description":"Human-readable description of what went wrong","type":"string"}},"required":["message"],"type":"object"}}},"paths":{"/v1/nodes/count":{"get":{"operationId":"nodes_count","parameters":[{"in":"query","name":"status","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TotalCountResponse"}}},"description":"Total count retrieved successfully"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Database error"},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Client error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Server error"}},"summary":"Get nodes total count","tags":["Resources"]}}}}
```

## 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-dev"},"tags":[{"description":"Cedana API for resources","name":"Resources"}],"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"scheme":"bearer","type":"http"}},"schemas":{"PodResponse":{"properties":{"age":{"type":"string"},"id":{"format":"uuid","type":"string"},"monitored_by_policies":{"items":{"type":"string"},"type":"array"},"name":{"type":"string"},"namespace":{"type":"string"},"node":{"type":"string"},"ready":{"type":"string"},"restarts":{"format":"int32","type":"integer"},"start_time":{"type":["string","null"]},"status":{"type":"string"}},"required":["id","name","namespace","status","age","ready","node","restarts","monitored_by_policies"],"type":"object"},"HttpError":{"description":"Standard JSON error body for all 4xx/5xx responses.\n\nHandlers return plain-text errors internally; [`normalize_error_response`]\nconverts anything the stack produces (handlers, extractors, the auth layer)\nto this shape, so generated SDK clients can rely on a single error schema.","properties":{"message":{"description":"Human-readable description of what went wrong","type":"string"}},"required":["message"],"type":"object"}}},"paths":{"/v1/pods":{"get":{"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":[{"in":"query","name":"id","required":false,"schema":{"format":"uuid","type":["string","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PodResponse"},"type":"array"}}},"description":"Returns pods"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Failed to fetch from database"},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Client error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Server error"}},"summary":"List pods","tags":["Resources"]}}}}
```

## GET /v1/pods/count

> Get total count of pods

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-dev"},"tags":[{"description":"Cedana API for resources","name":"Resources"}],"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"scheme":"bearer","type":"http"}},"schemas":{"TotalCountResponse":{"properties":{"total_count":{"format":"int64","type":"integer"}},"required":["total_count"],"type":"object"},"HttpError":{"description":"Standard JSON error body for all 4xx/5xx responses.\n\nHandlers return plain-text errors internally; [`normalize_error_response`]\nconverts anything the stack produces (handlers, extractors, the auth layer)\nto this shape, so generated SDK clients can rely on a single error schema.","properties":{"message":{"description":"Human-readable description of what went wrong","type":"string"}},"required":["message"],"type":"object"}}},"paths":{"/v1/pods/count":{"get":{"operationId":"pods_count","parameters":[{"in":"query","name":"status","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TotalCountResponse"}}},"description":"Total count retrieved successfully"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Database error"},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Client error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Server error"}},"summary":"Get total count of pods","tags":["Resources"]}}}}
```

## GET /v1/pods/namespaces

> List pod namespaces

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-dev"},"tags":[{"description":"Cedana API for resources","name":"Resources"}],"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"scheme":"bearer","type":"http"}},"schemas":{"NamespacesResponse":{"properties":{"namespaces":{"items":{"type":"string"},"type":"array"}},"required":["namespaces"],"type":"object"},"HttpError":{"description":"Standard JSON error body for all 4xx/5xx responses.\n\nHandlers return plain-text errors internally; [`normalize_error_response`]\nconverts anything the stack produces (handlers, extractors, the auth layer)\nto this shape, so generated SDK clients can rely on a single error schema.","properties":{"message":{"description":"Human-readable description of what went wrong","type":"string"}},"required":["message"],"type":"object"}}},"paths":{"/v1/pods/namespaces":{"get":{"operationId":"pod_namespaces","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NamespacesResponse"}}},"description":"Returns distinct pod namespaces"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Failed to fetch from database"},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Client error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Server error"}},"summary":"List pod namespaces","tags":["Resources"]}}}}
```

## GET /v1/pods/paginated

> List pods (paginated)

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-dev"},"tags":[{"description":"Cedana API for resources","name":"Resources"}],"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"scheme":"bearer","type":"http"}},"schemas":{"PaginatedPodResponse":{"properties":{"available_filters":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/AvailableFilters"}]},"pods":{"items":{"$ref":"#/components/schemas/PodResponse"},"type":"array"},"total_count":{"format":"int64","type":"integer"}},"required":["pods","total_count"],"type":"object"},"AvailableFilters":{"properties":{"namespaces":{"items":{"type":"string"},"type":"array"},"statuses":{"items":{"type":"string"},"type":"array"}},"required":["statuses","namespaces"],"type":"object"},"PodResponse":{"properties":{"age":{"type":"string"},"id":{"format":"uuid","type":"string"},"monitored_by_policies":{"items":{"type":"string"},"type":"array"},"name":{"type":"string"},"namespace":{"type":"string"},"node":{"type":"string"},"ready":{"type":"string"},"restarts":{"format":"int32","type":"integer"},"start_time":{"type":["string","null"]},"status":{"type":"string"}},"required":["id","name","namespace","status","age","ready","node","restarts","monitored_by_policies"],"type":"object"},"HttpError":{"description":"Standard JSON error body for all 4xx/5xx responses.\n\nHandlers return plain-text errors internally; [`normalize_error_response`]\nconverts anything the stack produces (handlers, extractors, the auth layer)\nto this shape, so generated SDK clients can rely on a single error schema.","properties":{"message":{"description":"Human-readable description of what went wrong","type":"string"}},"required":["message"],"type":"object"}}},"paths":{"/v1/pods/paginated":{"get":{"operationId":"pod_list_paginated","parameters":[{"in":"query","name":"id","required":false,"schema":{"format":"uuid","type":["string","null"]}},{"in":"query","name":"limit","required":false,"schema":{"format":"int64","type":["integer","null"]}},{"in":"query","name":"offset","required":false,"schema":{"format":"int64","type":["integer","null"]}},{"in":"query","name":"sort","required":false,"schema":{"type":["string","null"]}},{"in":"query","name":"ascending","required":false,"schema":{"type":["boolean","null"]}},{"in":"query","name":"status","required":false,"schema":{"type":["string","null"]}},{"in":"query","name":"namespace","required":false,"schema":{"type":["string","null"]}},{"description":"pod name to query against (uses postgres ILIKE pattern search)","in":"query","name":"pod_name","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPodResponse"}}},"description":"Returns paginated pods with total count and available filters"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Failed to fetch from database"},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Client error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Server error"}},"summary":"List pods (paginated)","tags":["Resources"]}}}}
```

## GET /v1/pods/statuses

> List pod statuses

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-dev"},"tags":[{"description":"Cedana API for resources","name":"Resources"}],"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"scheme":"bearer","type":"http"}},"schemas":{"StatusesResponse":{"properties":{"statuses":{"items":{"type":"string"},"type":"array"}},"required":["statuses"],"type":"object"},"HttpError":{"description":"Standard JSON error body for all 4xx/5xx responses.\n\nHandlers return plain-text errors internally; [`normalize_error_response`]\nconverts anything the stack produces (handlers, extractors, the auth layer)\nto this shape, so generated SDK clients can rely on a single error schema.","properties":{"message":{"description":"Human-readable description of what went wrong","type":"string"}},"required":["message"],"type":"object"}}},"paths":{"/v1/pods/statuses":{"get":{"operationId":"pod_statuses","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusesResponse"}}},"description":"Returns distinct pod statuses"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Failed to fetch from database"},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Client error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Server error"}},"summary":"List pod statuses","tags":["Resources"]}}}}
```
