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

# Checkpoints (Slurm)

Cedana API for checkpoints (Slurm)

## List checkpoints

> Use query params to filter checkpoints. Supports filtering by \`ids\` (comma-separated UUIDs\
> for single or multiple checkpoints), \`job\_id\` and \`cluster\_id\`

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-dev"},"tags":[{"description":"Cedana API for checkpoints (Slurm)","name":"Checkpoints (Slurm)"}],"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"scheme":"bearer","type":"http"}},"schemas":{"SlurmCheckpoint":{"description":"Checkpoint is basic unit for cedana service operation\nit stores all the information regarding the snapshot we can use to save and then restore state","properties":{"checksum":{"type":["string","null"]},"gpu":{"type":"string"},"id":{"format":"uuid","type":"string"},"info":{},"name":{"type":["string","null"]},"status":{"$ref":"#/components/schemas/SlurmCheckpointStatus"}},"required":["id","status","gpu"],"type":"object"},"SlurmCheckpointStatus":{"enum":["initializing","updated_info","possibly_uploaded","ready","deprecated"],"type":"string"},"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/slurm/checkpoints":{"get":{"description":"Use query params to filter checkpoints. Supports filtering by `ids` (comma-separated UUIDs\nfor single or multiple checkpoints), `job_id` and `cluster_id`","operationId":"list","parameters":[{"description":"Comma-separated list of checkpoint UUIDs to filter by","in":"query","name":"ids","required":false,"schema":{"type":"string"}},{"description":"Filter by SLURM job id","in":"query","name":"job_id","required":false,"schema":{"type":"string"}},{"description":"Filter by cluster UUID","in":"query","name":"cluster_id","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SlurmCheckpoint"},"type":"array"}}},"description":"Returns SLURM checkpoints"},"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 connect/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 checkpoints","tags":["Checkpoints (Slurm)"]}}}}
```

## Create checkpoint

> Builds a new checkpoint without the metadata and information about the checkpoint with status initializing

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-dev"},"tags":[{"description":"Cedana API for checkpoints (Slurm)","name":"Checkpoints (Slurm)"}],"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/slurm/checkpoints":{"post":{"description":"Builds a new checkpoint without the metadata and information about the checkpoint with status initializing","operationId":"add","responses":{"200":{"content":{"text/plain":{"schema":{"type":"string"}}},"description":"Returns the checkpoint id for the new checkpoint"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Failed create checkpoint"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Failed to connect/fetch from jobs table 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":"Create checkpoint","tags":["Checkpoints (Slurm)"]}}}}
```

## Deprecate checkpoint

> Marks checkpoint as deprecated, so that they can be removed on next internal state cleanup

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-dev"},"tags":[{"description":"Cedana API for checkpoints (Slurm)","name":"Checkpoints (Slurm)"}],"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/slurm/checkpoints/deprecate/{id}":{"patch":{"description":"Marks checkpoint as deprecated, so that they can be removed on next internal state cleanup","operationId":"deprecate","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"text/plain":{"schema":{"type":"string"}}},"description":"Successfully deprecated checkpoint and returns id"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Failed to find checkpoint from id"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Failed to connect/execute request against db"},"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":"Deprecate checkpoint","tags":["Checkpoints (Slurm)"]}}}}
```

## Put checkpoint info

> Add information about the checkpoint

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-dev"},"tags":[{"description":"Cedana API for checkpoints (Slurm)","name":"Checkpoints (Slurm)"}],"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"scheme":"bearer","type":"http"}},"schemas":{"SlurmCheckpointInfo":{"properties":{"gpu":{"type":"string"},"info":{},"platform":{"type":"string"}},"required":["gpu","platform"],"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/slurm/checkpoints/info/{id}":{"put":{"description":"Add information about the checkpoint","operationId":"update_info","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlurmCheckpointInfo"}}},"required":true},"responses":{"200":{"content":{"text/plain":{"schema":{"type":"string"}}},"description":"Successfully deprecated checkpoint and returns id"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Failed to find checkpoint from id"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Failed to connect/execute request against db"},"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":"Put checkpoint info","tags":["Checkpoints (Slurm)"]}}}}
```

## POST /v1/slurm/checkpoints/uploaded/{id}

> Uploaded checkpoint

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-dev"},"tags":[{"description":"Cedana API for checkpoints (Slurm)","name":"Checkpoints (Slurm)"}],"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"scheme":"bearer","type":"http"}},"schemas":{"SlurmCheckpointSuccessInfo":{"properties":{"restore_path":{"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/slurm/checkpoints/uploaded/{id}":{"post":{"operationId":"uploaded","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlurmCheckpointSuccessInfo"}}},"required":true},"responses":{"200":{"content":{"text/plain":{"schema":{"type":"string"}}},"description":"Marks the checkpoint as successfully uploaded"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Failed mark checkpoint"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpError"}}},"description":"Failed to connect/fetch from jobs table 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":"Uploaded checkpoint","tags":["Checkpoints (Slurm)"]}}}}
```
