> 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"]}}}}
```

## List jobs

> Paginated. Only returns jobs from clusters with status 'active'. \`cluster\_id\` scopes both the\
> jobs and the available filters to one cluster.

```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":{"get":{"description":"Paginated. Only returns jobs from clusters with status 'active'. `cluster_id` scopes both the\njobs and the available filters to one cluster.","operationId":"job_list","parameters":[{"description":"Page size (default 50, max 500)","in":"query","name":"limit","required":false,"schema":{"format":"int64","type":["integer","null"]}},{"description":"Row offset (default 0)","in":"query","name":"offset","required":false,"schema":{"format":"int64","type":["integer","null"]}},{"description":"Sort column: `id`, `name`, `namespace`, `status` or `start_time` (default `start_time`)","in":"query","name":"sort","required":false,"schema":{"type":["string","null"]}},{"description":"Sort ascending (default false)","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"]}},{"description":"Only return jobs belonging to this cluster","in":"query","name":"cluster_id","required":false,"schema":{"format":"uuid","type":["string","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedJobResponse"}}},"description":"Returns jobs with total count and available filters"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Invalid query parameters"},"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"}},{"description":"Only consider resources belonging to this cluster","in":"query","name":"cluster_id","required":false,"schema":{"format":"uuid","type":["string","null"]}}],"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"]}},{"description":"Only count resources belonging to this cluster","in":"query","name":"cluster_id","required":false,"schema":{"format":"uuid","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"]}},{"description":"Only return jobs belonging to this cluster","in":"query","name":"cluster_id","required":false,"schema":{"format":"uuid","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","parameters":[{"description":"Only consider resources belonging to this cluster","in":"query","name":"cluster_id","required":false,"schema":{"format":"uuid","type":["string","null"]}}],"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/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","parameters":[{"description":"Only consider resources belonging to this cluster","in":"query","name":"cluster_id","required":false,"schema":{"format":"uuid","type":["string","null"]}}],"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","parameters":[{"description":"Only consider resources belonging to this cluster","in":"query","name":"cluster_id","required":false,"schema":{"format":"uuid","type":["string","null"]}}],"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"},"cpu":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CpuInfo","description":"CPU of the node"}]},"gpu":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/GpuInfo","description":"GPU inventory; absent for nodes without NVIDIA GPUs"}]},"id":{"format":"uuid","type":"string"},"instance_type":{"type":"string"},"labels":{"additionalProperties":{"type":"string"},"description":"Node labels, without NFD's per-flag CPUID labels","propertyNames":{"type":"string"},"type":"object"},"name":{"type":"string"},"network":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/NetworkInfo","description":"NICs, RDMA and SR-IOV of the node"}]},"region":{"type":"string"},"status":{"type":"string"},"storage":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/StorageInfo","description":"Local storage and CSI drivers of the node"}]},"system":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SystemInfo","description":"Memory and software of the node"}]}},"required":["id","name","status","cluster_name","compute_type","instance_type","region","capacity_type","labels"],"type":"object"},"CpuInfo":{"description":"CPU of one node.","properties":{"allocatable_cores":{"description":"CPUs the scheduler can hand out, after system reservations","format":"double","type":["number","null"]},"architecture":{"description":"\"amd64\" or \"arm64\"","type":["string","null"]},"cores":{"description":"Logical CPUs on the node","format":"double","type":["number","null"]},"hyperthreading":{"description":"Whether SMT/hyper-threading is on (Node Feature Discovery)","type":["boolean","null"]},"hypervisor":{"description":"Hypervisor the node runs under, e.g. \"kvm\"; newer NFD versions only","type":["string","null"]},"isa_level":{"description":"Highest x86-64 microarchitecture level, e.g. \"x86-64-v4\" (Node Feature Discovery)","type":["string","null"]},"vendor":{"description":"\"Intel\" or \"AMD\" (Node Feature Discovery)","type":["string","null"]},"virtualized":{"description":"Whether the node is a VM, from the CPUID hypervisor flag (Node Feature Discovery)","type":["boolean","null"]}},"type":"object"},"GpuInfo":{"description":"GPU inventory of one node.","properties":{"allocatable":{"description":"nvidia.com/gpu the scheduler can hand out (excludes MIG slices)","format":"int64","type":["integer","null"]},"compute_capability":{"description":"Compute capability, e.g. \"9.0\"","type":["string","null"]},"count":{"description":"Physical GPUs on the node","format":"int64","type":["integer","null"]},"cuda_version":{"description":"Highest CUDA version the driver supports, e.g. \"12.4\"","type":["string","null"]},"driver_version":{"description":"NVIDIA driver version, e.g. \"550.54.15\"","type":["string","null"]},"family":{"description":"Architecture family, e.g. \"hopper\"","type":["string","null"]},"memory_mib":{"description":"Memory per GPU in MiB","format":"int64","type":["integer","null"]},"mig_devices":{"additionalProperties":{"format":"int64","type":"integer"},"description":"Allocatable MIG slices by profile, e.g. {\"1g.10gb\": 7}; empty when MIG is off","propertyNames":{"type":"string"},"type":"object"},"mig_strategy":{"description":"MIG strategy (\"none\", \"single\" or \"mixed\"), or \"disabled\" when mig-manager has MIG off","type":["string","null"]},"product":{"description":"GPU model, e.g. \"NVIDIA-H100-80GB-HBM3\"","type":["string","null"]}},"required":["mig_devices"],"type":"object"},"NetworkInfo":{"description":"Networking of one node: NICs, RDMA and the devices plugins expose for them.","properties":{"network_operator":{"description":"Whether the NVIDIA Network Operator manages this node's NIC drivers","type":"boolean"},"nic_vendors":{"description":"High-performance NIC vendors seen on the PCI bus, e.g. [\"NVIDIA Mellanox\"] (Node Feature Discovery)","items":{"type":"string"},"type":"array"},"rdma_available":{"description":"Whether the RDMA kernel modules are loaded (Node Feature Discovery)","type":["boolean","null"]},"rdma_capable":{"description":"Whether an RDMA-capable NIC is present (Node Feature Discovery)","type":["boolean","null"]},"rdma_resources":{"additionalProperties":{"format":"int64","type":"integer"},"description":"RDMA, InfiniBand, SR-IOV and EFA devices the node advertises, by resource name, e.g. {\"rdma/ib\": 8}","propertyNames":{"type":"string"},"type":"object"},"sriov_capable":{"description":"Whether a NIC supports SR-IOV (Node Feature Discovery)","type":["boolean","null"]},"sriov_configured":{"description":"Whether SR-IOV virtual functions are configured (Node Feature Discovery)","type":["boolean","null"]}},"required":["nic_vendors","network_operator","rdma_resources"],"type":"object"},"StorageInfo":{"description":"Local storage of one node.","properties":{"allocatable_ephemeral_storage_bytes":{"description":"Ephemeral storage the scheduler can hand out, after system reservations","format":"int64","type":["integer","null"]},"csi_drivers":{"description":"CSI drivers serving the node, from their topology labels, e.g. [\"csi.weka.io\"]","items":{"type":"string"},"type":"array"},"ephemeral_storage_bytes":{"format":"int64","type":["integer","null"]},"local_ssd":{"description":"Whether the node has a non-rotational (SSD/NVMe) disk (Node Feature Discovery)","type":["boolean","null"]}},"required":["csi_drivers"],"type":"object"},"SystemInfo":{"description":"Memory and software of one node.","properties":{"allocatable_memory_bytes":{"description":"Memory the scheduler can hand out, after system reservations","format":"int64","type":["integer","null"]},"container_runtime":{"description":"e.g. \"containerd://2.3.3\"","type":["string","null"]},"hugepages_bytes":{"description":"Huge pages reserved on the node, all page sizes together; absent when none are","format":"int64","type":["integer","null"]},"kernel_version":{"type":["string","null"]},"kubelet_version":{"type":["string","null"]},"max_pods":{"format":"int64","type":["integer","null"]},"memory_bytes":{"format":"int64","type":["integer","null"]},"numa":{"description":"Whether memory spans several NUMA nodes (Node Feature Discovery)","type":["boolean","null"]},"os_image":{"description":"e.g. \"Ubuntu 24.04.4 LTS\"","type":["string","null"]},"zone":{"type":["string","null"]}},"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"]}},{"description":"Only return nodes belonging to this cluster","in":"query","name":"cluster_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

> Paginated. Only returns pods from clusters with status 'active' whose node synced within the\
> last 5 minutes, and never pods with status 'deleted'. \`cluster\_id\` scopes both the pods and\
> the available filters to one cluster. \`id\` looks up that single pod (still subject to\
> \`cluster\_id\`) and ignores the other filters.

```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"},"cluster_id":{"description":"Cluster the pod runs on; null if the controller has not linked it yet","format":"uuid","type":["string","null"]},"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":"Paginated. Only returns pods from clusters with status 'active' whose node synced within the\nlast 5 minutes, and never pods with status 'deleted'. `cluster_id` scopes both the pods and\nthe available filters to one cluster. `id` looks up that single pod (still subject to\n`cluster_id`) and ignores the other filters.","operationId":"pod_list","parameters":[{"description":"Exact pod id. When set, every other filter except `cluster_id` is ignored","in":"query","name":"id","required":false,"schema":{"format":"uuid","type":["string","null"]}},{"description":"Page size (default 50, max 500)","in":"query","name":"limit","required":false,"schema":{"format":"int64","type":["integer","null"]}},{"description":"Row offset (default 0)","in":"query","name":"offset","required":false,"schema":{"format":"int64","type":["integer","null"]}},{"description":"Sort column: `id`, `name`, `namespace` or `status` (default `name`)","in":"query","name":"sort","required":false,"schema":{"type":["string","null"]}},{"description":"Sort ascending (default false)","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"]}},{"description":"Only return pods belonging to this cluster","in":"query","name":"cluster_id","required":false,"schema":{"format":"uuid","type":["string","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPodResponse"}}},"description":"Returns pods with total count and available filters"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Invalid query parameters"},"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"]}},{"description":"Only count resources belonging to this cluster","in":"query","name":"cluster_id","required":false,"schema":{"format":"uuid","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","parameters":[{"description":"Only consider resources belonging to this cluster","in":"query","name":"cluster_id","required":false,"schema":{"format":"uuid","type":["string","null"]}}],"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/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","parameters":[{"description":"Only consider resources belonging to this cluster","in":"query","name":"cluster_id","required":false,"schema":{"format":"uuid","type":["string","null"]}}],"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"]}}}}
```
