> 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/metrics.md).

# Metrics

Cedana API for metrics

## GET /v1/metrics/checkpoint-cpu

> Get checkpoint CPU data for efficiency calculations\
> Returns the CPU usage at checkpoint time for each protected pod,\
> allowing the frontend to calculate actual preservation ratios.

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-dev"},"tags":[{"description":"Cedana API for metrics","name":"Metrics"}],"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"scheme":"bearer","type":"http"}},"schemas":{"PodCheckpointCpu":{"description":"Per-pod checkpoint resource data for efficiency calculations","properties":{"checkpoint_count":{"description":"Total number of checkpoints for this pod","format":"int64","type":"integer"},"checkpoint_timestamp":{"description":"Timestamp of the last checkpoint","type":"string"},"cpu_at_checkpoint":{"description":"CPU usage (seconds) at the time of the last checkpoint\nThis represents the work preserved by the checkpoint","format":"double","type":"number"},"gpu_memory_used_mib":{"description":"GPU memory used (MiB) at checkpoint time, if GPU was used","format":"double","type":["number","null"]},"gpu_model":{"description":"GPU model name (e.g., \"NVIDIA H100 80GB HBM3\"), if GPU was used","type":["string","null"]},"gpu_utilization_at_checkpoint":{"description":"GPU utilization at checkpoint time (percentage 0-100), if GPU was used\nDerived from DCGM_FI_DEV_GPU_UTIL metric","format":"double","type":["number","null"]},"namespace":{"description":"Namespace","type":"string"},"pod_name":{"description":"Pod name","type":"string"}},"required":["pod_name","namespace","cpu_at_checkpoint","checkpoint_timestamp","checkpoint_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/metrics/checkpoint-cpu":{"get":{"operationId":"get_checkpoint_cpu","parameters":[{"description":"Time window in hours (default: 24, max: 168 = 7 days)","in":"query","name":"hours","required":false,"schema":{"format":"int64","type":["integer","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PodCheckpointCpu"},"type":"array"}}},"description":"Returns per-pod checkpoint CPU data"},"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 checkpoint CPU data for efficiency calculations\nReturns the CPU usage at checkpoint time for each protected pod,\nallowing the frontend to calculate actual preservation ratios.","tags":["Metrics"]}}}}
```

## GET /v1/metrics/checkpoint-savings

> List checkpoint savings per pod

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-dev"},"tags":[{"description":"Cedana API for metrics","name":"Metrics"}],"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"scheme":"bearer","type":"http"}},"schemas":{"PodCheckpointSavings":{"description":"Per-pod checkpoint savings data","properties":{"avg_interval_seconds":{"description":"Average interval between checkpoints (seconds)","format":"double","type":["number","null"]},"capacity_type":{"description":"Node capacity type: \"spot\" or \"on-demand\"","type":["string","null"]},"checkpoint_count":{"format":"int64","type":["integer","null"]},"cluster_id":{"type":["string","null"]},"estimated_savings":{"description":"Estimated savings (if spot instance)","format":"double","type":["number","null"]},"first_checkpoint":{"format":"date-time","type":["string","null"]},"gpu":{"type":["string","null"]},"heartbeat_checkpoints":{"description":"Number of automatic heartbeat checkpoints","format":"int64","type":["integer","null"]},"instance_type":{"description":"Node instance type (e.g., \"m5.xlarge\", \"n1-standard-4\")","type":["string","null"]},"last_checkpoint":{"format":"date-time","type":["string","null"]},"manual_checkpoints":{"description":"Number of manual checkpoints","format":"int64","type":["integer","null"]},"max_recovery_point_seconds":{"description":"Maximum interval - worst case data loss on failure (seconds)","format":"double","type":["number","null"]},"min_interval_seconds":{"description":"Minimum interval between checkpoints (seconds)","format":"double","type":["number","null"]},"namespace":{"type":["string","null"]},"node_name":{"description":"Node name (for linking to node details page)","type":["string","null"]},"node_region":{"description":"Node region","type":["string","null"]},"ondemand_price_per_hour":{"description":"On-demand price per hour (from user config)","format":"double","type":["number","null"]},"platform":{"type":["string","null"]},"pod_name":{"type":["string","null"]},"protection_efficiency_ratio":{"description":"Ratio of time protected to checkpoint overhead (higher = more efficient)","format":"double","type":["number","null"]},"refreshed_at":{"format":"date-time","type":["string","null"]},"spot_price_per_hour":{"description":"Spot price per hour (from user config)","format":"double","type":["number","null"]},"time_protected_seconds":{"description":"Total time (seconds) between first and last checkpoint - time \"protected\"","format":"double","type":["number","null"]},"total_checkpoint_duration_ns":{"description":"Total time spent checkpointing (nanoseconds)","format":"int64","type":["integer","null"]},"total_checkpoint_size_bytes":{"description":"Total data checkpointed (bytes)","format":"int64","type":["integer","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/metrics/checkpoint-savings":{"get":{"operationId":"list_checkpoint_savings","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PodCheckpointSavings"},"type":"array"}}},"description":"Returns checkpoint savings data per pod"},"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":"List checkpoint savings per pod","tags":["Metrics"]}}}}
```

## GET /v1/metrics/checkpoint-savings/estimate

> Calculate cost savings estimate with user-provided hourly rate

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-dev"},"tags":[{"description":"Cedana API for metrics","name":"Metrics"}],"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"scheme":"bearer","type":"http"}},"schemas":{"CostSavingsEstimate":{"description":"Cost savings estimate with user-provided hourly rate","properties":{"checkpoint_overhead_cost":{"description":"Cost of checkpoint overhead (time spent checkpointing)","format":"double","type":"number"},"hourly_rate":{"description":"User-provided hourly compute cost","format":"double","type":"number"},"max_recovery_point_seconds":{"description":"Maximum potential data loss on failure (seconds) - worst case recovery point","format":"double","type":"number"},"max_savings_per_failure":{"description":"Estimated maximum cost saved per failure event\n(time_protected - max_recovery_point) * hourly_rate / 3600","format":"double","type":"number"},"net_potential_savings":{"description":"Net potential savings = max_savings - overhead_cost","format":"double","type":"number"},"pods_protected":{"description":"Number of pods protected","format":"int64","type":"integer"},"time_protected_seconds":{"description":"Total time protected by checkpoints (seconds)","format":"double","type":"number"},"total_checkpoints":{"description":"Total checkpoints taken","format":"int64","type":"integer"}},"required":["time_protected_seconds","max_recovery_point_seconds","hourly_rate","max_savings_per_failure","checkpoint_overhead_cost","net_potential_savings","pods_protected","total_checkpoints"],"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/metrics/checkpoint-savings/estimate":{"get":{"operationId":"get_cost_savings_estimate","parameters":[{"description":"Hourly compute cost rate (e.g., 10.50 for $10.50/hour)","in":"query","name":"hourly_rate","required":true,"schema":{"format":"double","type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CostSavingsEstimate"}}},"description":"Returns cost savings estimate"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Invalid hourly rate"},"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":"Calculate cost savings estimate with user-provided hourly rate","tags":["Metrics"]}}}}
```

## GET /v1/metrics/checkpoint-savings/summary

> Get organization-level checkpoint savings summary

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-dev"},"tags":[{"description":"Cedana API for metrics","name":"Metrics"}],"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"scheme":"bearer","type":"http"}},"schemas":{"OrgCheckpointSavings":{"description":"Organization-level checkpoint savings summary","properties":{"avg_checkpoint_interval_seconds":{"format":"double","type":["number","null"]},"pods_protected":{"format":"int64","type":["integer","null"]},"refreshed_at":{"format":"date-time","type":["string","null"]},"total_checkpoint_overhead_ns":{"format":"int64","type":["integer","null"]},"total_checkpoint_storage_bytes":{"format":"int64","type":["integer","null"]},"total_checkpoints":{"format":"int64","type":["integer","null"]},"total_estimated_savings":{"description":"Total estimated savings across all pods (spot vs on-demand)","format":"double","type":["number","null"]},"total_heartbeat_checkpoints":{"format":"int64","type":["integer","null"]},"total_manual_checkpoints":{"format":"int64","type":["integer","null"]},"total_time_protected_seconds":{"format":"double","type":["number","null"]},"worst_case_recovery_point_seconds":{"format":"double","type":["number","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/metrics/checkpoint-savings/summary":{"get":{"operationId":"get_checkpoint_savings_summary","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgCheckpointSavings"}}},"description":"Returns organization-level savings summary"},"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 organization-level checkpoint savings summary","tags":["Metrics"]}}}}
```

## GET /v1/metrics/export

> Prometheus exposition of checkpoint and restore metrics

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-dev"},"tags":[{"description":"Cedana API for metrics","name":"Metrics"}],"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"scheme":"bearer","type":"http"}},"schemas":{"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/metrics/export":{"get":{"operationId":"export","responses":{"200":{"content":{"text/plain":{"schema":{"type":"string"}}},"description":"Prometheus text exposition (version 0.0.4)"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"ClickHouse unavailable or query timed out"},"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":"Prometheus exposition of checkpoint and restore metrics","tags":["Metrics"]}}}}
```

## GET /v1/metrics/gpu

> Get GPU metrics grouped by node

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-dev"},"tags":[{"description":"Cedana API for metrics","name":"Metrics"}],"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"scheme":"bearer","type":"http"}},"schemas":{"NodeGpuMetrics":{"description":"GPU metrics grouped by node","properties":{"gpus":{"items":{"$ref":"#/components/schemas/GpuMetric"},"type":"array"},"node_name":{"type":"string"}},"required":["node_name","gpus"],"type":"object"},"GpuMetric":{"description":"GPU metrics for a single GPU","properties":{"gpu_index":{"type":"string"},"gpu_utilization":{"description":"GPU utilization percentage (0-100)","format":"double","type":["number","null"]},"gpu_uuid":{"type":"string"},"memory_free_mib":{"description":"Framebuffer memory free in MiB","format":"double","type":["number","null"]},"memory_used_mib":{"description":"Framebuffer memory used in MiB","format":"double","type":["number","null"]},"memory_utilization":{"description":"Memory bandwidth utilization percentage (0-100)","format":"double","type":["number","null"]},"model_name":{"description":"GPU model name (e.g., \"NVIDIA H100 80GB HBM3\")","type":["string","null"]},"namespace":{"description":"Namespace of the pod (if any)","type":["string","null"]},"node_name":{"type":"string"},"pod_name":{"description":"Pod currently using this GPU (if any)","type":["string","null"]},"power_watts":{"description":"Power usage in Watts","format":"double","type":["number","null"]},"temperature_celsius":{"description":"GPU temperature in Celsius","format":"double","type":["number","null"]},"timestamp":{"type":"string"}},"required":["node_name","gpu_uuid","gpu_index","timestamp"],"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/metrics/gpu":{"get":{"operationId":"get_gpu_metrics","parameters":[{"description":"Filter by node name","in":"query","name":"node_name","required":false,"schema":{"type":["string","null"]}},{"description":"Time window in hours (default: 1, max: 24)","in":"query","name":"hours","required":false,"schema":{"format":"int64","type":["integer","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/NodeGpuMetrics"},"type":"array"}}},"description":"Returns GPU metrics grouped by node"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Failed to fetch GPU metrics"},"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 GPU metrics grouped by node","tags":["Metrics"]}}}}
```

## GET /v1/metrics/gpu/timeseries

> Get GPU time-series data for a specific GPU

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-dev"},"tags":[{"description":"Cedana API for metrics","name":"Metrics"}],"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"scheme":"bearer","type":"http"}},"schemas":{"GpuTimeSeries":{"description":"Time-series data for a single GPU","properties":{"data":{"items":{"$ref":"#/components/schemas/GpuTimeSeriesPoint"},"type":"array"},"gpu_index":{"type":"string"},"gpu_uuid":{"type":"string"},"model_name":{"type":["string","null"]},"node_name":{"type":"string"}},"required":["node_name","gpu_uuid","gpu_index","data"],"type":"object"},"GpuTimeSeriesPoint":{"description":"Time-series data point for GPU metrics","properties":{"gpu_utilization":{"format":"double","type":["number","null"]},"memory_free_mib":{"format":"double","type":["number","null"]},"memory_used_mib":{"format":"double","type":["number","null"]},"memory_utilization":{"format":"double","type":["number","null"]},"namespace":{"type":["string","null"]},"pod_name":{"type":["string","null"]},"timestamp":{"type":"string"}},"required":["timestamp"],"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/metrics/gpu/timeseries":{"get":{"operationId":"get_gpu_time_series","parameters":[{"description":"GPU UUID to get time-series for","in":"query","name":"gpu_uuid","required":true,"schema":{"type":"string"}},{"description":"Time window in minutes (default: 60, max: 1440)","in":"query","name":"minutes","required":false,"schema":{"format":"int64","type":["integer","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GpuTimeSeries"}}},"description":"Returns GPU time-series data"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Failed to fetch GPU time-series"},"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 GPU time-series data for a specific GPU","tags":["Metrics"]}}}}
```

## GET /v1/metrics/k8

> Get metrics (K8s)

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-dev"},"tags":[{"description":"Cedana API for metrics","name":"Metrics"}],"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"scheme":"bearer","type":"http"}},"schemas":{"NodeResourceMetricList":{"description":"New structured event state","properties":{"details":{"items":{"$ref":"#/components/schemas/NodeMetricItem"},"type":"array"},"name":{"type":"string"}},"required":["name"],"type":"object"},"NodeMetricItem":{"properties":{"collector":{"type":"string"},"cpu_core":{"type":"string"},"cpu_mode":{"type":"string"},"filesystem":{"type":"string"},"metric_name":{"type":"string"},"mountpoint":{"type":"string"},"resource":{"type":["string","null"]},"timestamp":{"type":"string"},"value":{"type":"string"}},"required":["metric_name","collector","value","timestamp"],"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/metrics/k8":{"get":{"operationId":"get_k8_metrics","parameters":[{"in":"query","name":"name","required":false,"schema":{"type":["string","null"]}},{"in":"query","name":"collector_type","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/NodeResourceMetricList"},"type":"array"}}},"description":"Returns k8 metrics"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Failed to fetch metrics"},"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 metrics (K8s)","tags":["Metrics"]}}}}
```

## GET /v1/metrics/operations/summary

> Windowed operation aggregates for dashboards

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-dev"},"tags":[{"description":"Cedana API for metrics","name":"Metrics"}],"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"scheme":"bearer","type":"http"}},"schemas":{"OperationsSummary":{"description":"Windowed aggregates over the same facts and bucket boundaries as the Prometheus export.","properties":{"artifact_size_buckets":{"items":{"$ref":"#/components/schemas/HistogramBucket"},"type":"array"},"attempts":{"format":"int64","minimum":0,"type":"integer"},"failed":{"format":"int64","minimum":0,"type":"integer"},"failures":{"items":{"$ref":"#/components/schemas/FailureSummary"},"type":"array"},"fallbacks":{"format":"int64","minimum":0,"type":"integer"},"operations":{"items":{"$ref":"#/components/schemas/OperationTotals"},"type":"array"},"stages":{"items":{"$ref":"#/components/schemas/StageSummary"},"type":"array"},"step_seconds":{"format":"int64","type":"integer"},"succeeded":{"format":"int64","minimum":0,"type":"integer"},"tiers":{"items":{"$ref":"#/components/schemas/TierSummary"},"type":"array"},"timeline":{"items":{"$ref":"#/components/schemas/TimelinePoint"},"type":"array"},"window_seconds":{"format":"int64","type":"integer"}},"required":["window_seconds","step_seconds","attempts","succeeded","failed","fallbacks","operations","artifact_size_buckets","stages","failures","tiers","timeline"],"type":"object"},"HistogramBucket":{"properties":{"count":{"format":"int64","minimum":0,"type":"integer"},"le":{"description":"Upper bound of the bucket (seconds or bytes); `null` marks the overflow bucket above the last bound.","format":"double","type":["number","null"]}},"required":["count"],"type":"object"},"FailureSummary":{"properties":{"count":{"format":"int64","minimum":0,"type":"integer"},"operation":{"type":"string"},"reason":{"type":"string"},"stage":{"type":"string"}},"required":["operation","stage","reason","count"],"type":"object"},"OperationTotals":{"properties":{"attempts":{"format":"int64","minimum":0,"type":"integer"},"bytes_total":{"format":"int64","minimum":0,"type":"integer"},"duration_buckets":{"items":{"$ref":"#/components/schemas/HistogramBucket"},"type":"array"},"failed":{"format":"int64","minimum":0,"type":"integer"},"fallbacks":{"format":"int64","minimum":0,"type":"integer"},"operation":{"type":"string"},"p50_ns":{"format":"double","type":"number"},"p95_ns":{"format":"double","type":"number"},"pause_p50_ns":{"description":"Checkpoints: pause percentiles over attempts with a pause recorded (0 otherwise).","format":"double","type":"number"},"pause_p95_ns":{"format":"double","type":"number"},"succeeded":{"format":"int64","minimum":0,"type":"integer"},"to_ready_count":{"format":"int64","minimum":0,"type":"integer"},"to_ready_p50_ns":{"description":"Restores: PodScheduled→Ready percentiles over attempts whose pod reached Ready (0 otherwise).","format":"double","type":"number"},"to_ready_p95_ns":{"format":"double","type":"number"}},"required":["operation","attempts","succeeded","failed","fallbacks","p50_ns","p95_ns","bytes_total","duration_buckets","pause_p50_ns","pause_p95_ns","to_ready_p50_ns","to_ready_p95_ns","to_ready_count"],"type":"object"},"StageSummary":{"properties":{"count":{"format":"int64","minimum":0,"type":"integer"},"operation":{"type":"string"},"p50_ns":{"format":"double","type":"number"},"p95_ns":{"format":"double","type":"number"},"stage":{"type":"string"},"total_ns":{"format":"int64","minimum":0,"type":"integer"}},"required":["operation","stage","count","p50_ns","p95_ns","total_ns"],"type":"object"},"TierSummary":{"properties":{"attempts":{"format":"int64","minimum":0,"type":"integer"},"bytes_total":{"format":"int64","minimum":0,"type":"integer"},"operation":{"type":"string"},"p50_ns":{"format":"double","type":"number"},"storage_tier":{"type":"string"},"succeeded":{"format":"int64","minimum":0,"type":"integer"}},"required":["operation","storage_tier","attempts","succeeded","p50_ns","bytes_total"],"type":"object"},"TimelinePoint":{"properties":{"bucket_ms":{"format":"int64","type":"integer"},"failed":{"format":"int64","minimum":0,"type":"integer"},"fallbacks":{"format":"int64","minimum":0,"type":"integer"},"operation":{"type":"string"},"succeeded":{"format":"int64","minimum":0,"type":"integer"}},"required":["bucket_ms","operation","succeeded","failed","fallbacks"],"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/metrics/operations/summary":{"get":{"operationId":"operations_summary","parameters":[{"description":"Window in seconds (default 604800, max 90 days)","in":"query","name":"time","required":false,"schema":{"format":"int64","type":["integer","null"]}},{"description":"kubernetes | slurm","in":"query","name":"workload","required":false,"schema":{"type":["string","null"]}},{"description":"checkpoint | restore","in":"query","name":"operation","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationsSummary"}}},"description":"Counts, percentiles, histograms, stages, failures and a timeline for the window"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"ClickHouse unavailable or query timed out"},"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":"Windowed operation aggregates for dashboards","tags":["Metrics"]}}}}
```

## GET /v1/metrics/pods

> Get pod utilization metrics

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-dev"},"tags":[{"description":"Cedana API for metrics","name":"Metrics"}],"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"scheme":"bearer","type":"http"}},"schemas":{"PodUtilization":{"description":"Pod utilization metrics grouped by pod","properties":{"cpu_usage_seconds":{"format":"double","type":"number"},"memory_bytes":{"format":"double","type":"number"},"namespace":{"type":["string","null"]},"node_name":{"type":"string"},"owner_kind":{"description":"Owner kind from kube-state-metrics (e.g., \"Job\", \"ReplicaSet\", \"DaemonSet\", \"StatefulSet\")","type":["string","null"]},"owner_name":{"description":"Owner name from kube-state-metrics (e.g., \"my-job\", \"my-deployment-abc123\")","type":["string","null"]},"pod_name":{"type":["string","null"]},"pod_uid":{"type":"string"},"timestamp":{"type":"string"}},"required":["pod_uid","node_name","cpu_usage_seconds","memory_bytes","timestamp"],"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/metrics/pods":{"get":{"operationId":"get_pod_utilization","parameters":[{"description":"Filter by pod UID","in":"query","name":"pod_uid","required":false,"schema":{"type":["string","null"]}},{"description":"Filter by node name","in":"query","name":"node_name","required":false,"schema":{"type":["string","null"]}},{"description":"Limit results (default: 100, max: 1000)","in":"query","name":"limit","required":false,"schema":{"format":"int64","type":["integer","null"]}},{"description":"Time window in hours (default: 1, max: 168 = 7 days)","in":"query","name":"hours","required":false,"schema":{"format":"int64","type":["integer","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PodUtilization"},"type":"array"}}},"description":"Returns pod utilization metrics"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Failed to fetch pod metrics"},"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 pod utilization metrics","tags":["Metrics"]}}}}
```

## GET /v1/metrics/pods/top/cpu

> Get top pods by CPU usage

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-dev"},"tags":[{"description":"Cedana API for metrics","name":"Metrics"}],"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"scheme":"bearer","type":"http"}},"schemas":{"TopPod":{"description":"Top pods by resource usage","properties":{"cpu_usage_seconds":{"format":"double","type":"number"},"memory_bytes":{"format":"double","type":"number"},"namespace":{"type":["string","null"]},"node_name":{"type":"string"},"pod_name":{"type":["string","null"]},"pod_uid":{"type":"string"}},"required":["pod_uid","node_name","cpu_usage_seconds","memory_bytes"],"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/metrics/pods/top/cpu":{"get":{"operationId":"get_top_pods_by_cpu","parameters":[{"description":"Number of pods to return (default: 10, max: 100)","in":"query","name":"limit","required":false,"schema":{"format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TopPod"},"type":"array"}}},"description":"Returns top pods by CPU"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Failed to fetch top pods"},"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 top pods by CPU usage","tags":["Metrics"]}}}}
```

## GET /v1/metrics/pods/top/memory

> Get top pods by memory usage

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-dev"},"tags":[{"description":"Cedana API for metrics","name":"Metrics"}],"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"scheme":"bearer","type":"http"}},"schemas":{"TopPod":{"description":"Top pods by resource usage","properties":{"cpu_usage_seconds":{"format":"double","type":"number"},"memory_bytes":{"format":"double","type":"number"},"namespace":{"type":["string","null"]},"node_name":{"type":"string"},"pod_name":{"type":["string","null"]},"pod_uid":{"type":"string"}},"required":["pod_uid","node_name","cpu_usage_seconds","memory_bytes"],"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/metrics/pods/top/memory":{"get":{"operationId":"get_top_pods_by_memory","parameters":[{"description":"Number of pods to return (default: 10, max: 100)","in":"query","name":"limit","required":false,"schema":{"format":"int64","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TopPod"},"type":"array"}}},"description":"Returns top pods by memory"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Failed to fetch top pods"},"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 top pods by memory usage","tags":["Metrics"]}}}}
```

## GET /v1/metrics/slurm

> Get metrics (Slurm)

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-dev"},"tags":[{"description":"Cedana API for metrics","name":"Metrics"}],"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"scheme":"bearer","type":"http"}},"schemas":{"SlurmMetric":{"properties":{"counter_value":{"format":"double","type":["number","null"]},"gauge_value":{"format":"double","type":["number","null"]},"id":{"format":"int64","minimum":0,"type":"integer"},"kind":{"type":["string","null"]},"name":{"type":"string"},"tags":{},"timestamp":{"format":"int64","type":"integer"}},"required":["id","name","timestamp"],"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/metrics/slurm":{"get":{"operationId":"get_slurm_metrics","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SlurmMetric"},"type":"array"}}},"description":"Returns SLURM metrics"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Failed to fetch SLURM metrics"},"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 metrics (Slurm)","tags":["Metrics"]}}}}
```

## GET /v1/metrics/slurm/overview

> Get cluster overview (Slurm)

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-dev"},"tags":[{"description":"Cedana API for metrics","name":"Metrics"}],"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"scheme":"bearer","type":"http"}},"schemas":{"SlurmClusterOverview":{"properties":{"cpu_load":{"format":"double","type":["number","null"]},"cpus_idle":{"format":"double","type":["number","null"]},"cpus_total":{"format":"double","type":["number","null"]},"mem_alloc":{"format":"double","type":["number","null"]},"mem_free":{"format":"double","type":["number","null"]},"mem_real":{"format":"double","type":["number","null"]},"timestamp":{"format":"int64","type":"integer"}},"required":["timestamp"],"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/metrics/slurm/overview":{"get":{"operationId":"get_slurm_cluster_overview","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlurmClusterOverview"}}},"description":"Returns SLURM cluster overview"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Failed to fetch SLURM cluster overview"},"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 cluster overview (Slurm)","tags":["Metrics"]}}}}
```

## GET /v1/metrics/slurm/overview/state

> Get state breakdown (Slurm)

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-dev"},"tags":[{"description":"Cedana API for metrics","name":"Metrics"}],"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"scheme":"bearer","type":"http"}},"schemas":{"SlurmStateBreakdown":{"properties":{"cpus_by_state":{"items":{"$ref":"#/components/schemas/StateItem"},"type":"array"},"nodes_by_state":{"items":{"$ref":"#/components/schemas/StateItem"},"type":"array"},"timestamp":{"format":"int64","type":"integer"}},"required":["timestamp","cpus_by_state","nodes_by_state"],"type":"object"},"StateItem":{"properties":{"state":{"type":"string"},"value":{"format":"double","type":"number"}},"required":["state","value"],"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/metrics/slurm/overview/state":{"get":{"operationId":"get_slurm_state_breakdown","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlurmStateBreakdown"}}},"description":"Returns state breakdown"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Failed to fetch state breakdown"},"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 state breakdown (Slurm)","tags":["Metrics"]}}}}
```

## GET /v1/metrics/slurm/partitions

> Get partition statistics (Slurm)

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-dev"},"tags":[{"description":"Cedana API for metrics","name":"Metrics"}],"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"scheme":"bearer","type":"http"}},"schemas":{"PartitionStats":{"properties":{"cpu_load":{"format":"double","type":["number","null"]},"free_memory":{"format":"double","type":["number","null"]},"idle_cpus":{"format":"double","type":["number","null"]},"idle_nodes":{"format":"double","type":["number","null"]},"partition_name":{"type":"string"},"real_memory":{"format":"double","type":["number","null"]},"timestamp":{"format":"int64","type":"integer"},"total_cpus":{"format":"double","type":["number","null"]}},"required":["partition_name","timestamp"],"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/metrics/slurm/partitions":{"get":{"operationId":"get_partition_stats","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PartitionStats"},"type":"array"}}},"description":"Returns partition statistics"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Failed to fetch partition statistics"},"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 partition statistics (Slurm)","tags":["Metrics"]}}}}
```

## GET /v1/metrics/slurm/partitions/nodes

> Get partition node counts by state (Slurm)

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-dev"},"tags":[{"description":"Cedana API for metrics","name":"Metrics"}],"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"scheme":"bearer","type":"http"}},"schemas":{"PartitionNodeCount":{"description":"Node count per state for a partition","properties":{"count":{"format":"double","type":"number"},"partition_name":{"type":"string"},"state":{"type":"string"}},"required":["partition_name","state","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/metrics/slurm/partitions/nodes":{"get":{"operationId":"get_partition_node_counts","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PartitionNodeCount"},"type":"array"}}},"description":"Returns node counts per partition per state"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Failed to fetch partition node counts"},"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 partition node counts by state (Slurm)","tags":["Metrics"]}}}}
```

## GET /v1/metrics/slurm/partitions/{name}/timeseries

> Get partition time series (Slurm)

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-dev"},"tags":[{"description":"Cedana API for metrics","name":"Metrics"}],"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"scheme":"bearer","type":"http"}},"schemas":{"PartitionTimeSeries":{"properties":{"cpu_load":{"items":{"$ref":"#/components/schemas/TimeSeriesDataPoint"},"type":"array"},"free_memory":{"items":{"$ref":"#/components/schemas/TimeSeriesDataPoint"},"type":"array"},"partition_name":{"type":"string"}},"required":["partition_name","cpu_load","free_memory"],"type":"object"},"TimeSeriesDataPoint":{"properties":{"timestamp":{"format":"int64","type":"integer"},"value":{"format":"double","type":"number"}},"required":["timestamp","value"],"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/metrics/slurm/partitions/{name}/timeseries":{"get":{"operationId":"get_partition_timeseries","parameters":[{"description":"Partition name","in":"path","name":"name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartitionTimeSeries"}}},"description":"Returns partition time series"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Failed to fetch partition time series"},"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 partition time series (Slurm)","tags":["Metrics"]}}}}
```

## GET /v1/metrics/slurm/timeseries/cpu-load

> Get CPU load time series (Slurm)

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-dev"},"tags":[{"description":"Cedana API for metrics","name":"Metrics"}],"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"scheme":"bearer","type":"http"}},"schemas":{"TimeSeriesDataPoint":{"properties":{"timestamp":{"format":"int64","type":"integer"},"value":{"format":"double","type":"number"}},"required":["timestamp","value"],"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/metrics/slurm/timeseries/cpu-load":{"get":{"operationId":"get_cpu_load_timeseries","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TimeSeriesDataPoint"},"type":"array"}}},"description":"Returns CPU load time series"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Failed to fetch CPU load time series"},"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 CPU load time series (Slurm)","tags":["Metrics"]}}}}
```

## GET /v1/metrics/slurm/timeseries/memory

> Get memory time series (Slurm)

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-dev"},"tags":[{"description":"Cedana API for metrics","name":"Metrics"}],"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"scheme":"bearer","type":"http"}},"schemas":{"MemoryTimeSeries":{"properties":{"allocated_memory":{"items":{"$ref":"#/components/schemas/TimeSeriesDataPoint"},"type":"array"},"free_memory":{"items":{"$ref":"#/components/schemas/TimeSeriesDataPoint"},"type":"array"}},"required":["free_memory","allocated_memory"],"type":"object"},"TimeSeriesDataPoint":{"properties":{"timestamp":{"format":"int64","type":"integer"},"value":{"format":"double","type":"number"}},"required":["timestamp","value"],"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/metrics/slurm/timeseries/memory":{"get":{"operationId":"get_memory_timeseries","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryTimeSeries"}}},"description":"Returns memory time series"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Failed to fetch memory time series"},"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 memory time series (Slurm)","tags":["Metrics"]}}}}
```

## GET /v1/operations/{id}

> One checkpoint or restore attempt with its stage breakdown

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-dev"},"tags":[{"description":"Cedana API for metrics","name":"Metrics"}],"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"scheme":"bearer","type":"http"}},"schemas":{"OperationDetail":{"allOf":[{"$ref":"#/components/schemas/OperationRow"},{"properties":{"restores":{"description":"For a checkpoint, every restore made from it; empty for a restore.","items":{"$ref":"#/components/schemas/OperationRow"},"type":"array"},"stages":{"items":{"$ref":"#/components/schemas/OperationStage"},"type":"array"}},"required":["stages","restores"],"type":"object"}]},"OperationRow":{"properties":{"action_id":{"type":"string"},"checkpoint_id":{"type":"string"},"cluster_id":{"type":"string"},"completed_at_ms":{"format":"int64","type":["integer","null"]},"duration_ns":{"format":"int64","minimum":0,"type":"integer"},"failure_reason":{"type":"string"},"failure_stage":{"type":"string"},"gpu_model":{"type":"string"},"kind":{"type":"string"},"logical_bytes":{"format":"int64","minimum":0,"type":"integer"},"name":{"type":"string"},"namespace":{"type":"string"},"node_name":{"type":"string"},"op_type":{"type":"string"},"operation_id":{"type":"string"},"pause_ns":{"format":"int64","minimum":0,"type":"integer"},"physical_bytes":{"format":"int64","minimum":0,"type":"integer"},"platform":{"type":"string"},"pod_ready_at_ms":{"format":"int64","type":["integer","null"]},"pod_scheduled_at_ms":{"description":"Restores only: PodScheduled / Ready transitions of the restored pod, once known.","format":"int64","type":["integer","null"]},"pod_uid":{"type":"string"},"reason":{"type":"string"},"restore_uuid":{"type":"string"},"result":{"type":"string"},"source":{"type":"string"},"started_at_ms":{"description":"Milliseconds since the Unix epoch.","format":"int64","type":"integer"},"storage_tier":{"type":"string"},"workload_type":{"type":"string"}},"required":["operation_id","op_type","workload_type","cluster_id","node_name","pod_uid","name","namespace","action_id","checkpoint_id","restore_uuid","reason","kind","result","failure_stage","failure_reason","storage_tier","gpu_model","platform","started_at_ms","duration_ns","pause_ns","logical_bytes","physical_bytes","source"],"type":"object"},"OperationStage":{"properties":{"bytes_in":{"format":"int64","minimum":0,"type":"integer"},"bytes_out":{"format":"int64","minimum":0,"type":"integer"},"duration_ns":{"format":"int64","minimum":0,"type":"integer"},"reason":{"type":"string"},"result":{"type":"string"},"seq":{"format":"int32","minimum":0,"type":"integer"},"stage":{"type":"string"}},"required":["stage","seq","duration_ns","bytes_in","bytes_out","result","reason"],"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/operations/{id}":{"get":{"operationId":"get_operation","parameters":[{"description":"Checkpoint id or restore uuid","in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationDetail"}}},"description":"Operation fact, its stages and, for a checkpoint, the restores made from it"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"No fact recorded for this id"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"ClickHouse unavailable"},"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":"One checkpoint or restore attempt with its stage breakdown","tags":["Metrics"]}}}}
```
