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

# Actions (Slurm)

Cedana API for actions (Slurm)

## POST /v2/slurm/checkpoint/job

> Checkpoint job

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-staging"},"tags":[{"name":"Actions (Slurm)","description":"Cedana API for actions (Slurm)"}],"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"type":"http","scheme":"bearer"}},"schemas":{"CheckpointSlurmJob":{"type":"object","properties":{"action_id":{"type":["string","null"],"readOnly":true},"job_id":{"type":["string","null"]},"job_name":{"type":["string","null"]},"kind":{"$ref":"#/components/schemas/CheckpointKind"},"reason":{"$ref":"#/components/schemas/CheckpointReason"}}},"CheckpointKind":{"type":"string","enum":["simple","rootfs","rootfsonly"]},"CheckpointReason":{"type":"string","enum":["heartbeat","manual"]},"ApiError":{"type":"object","description":"Standard error response for API endpoints","required":["message"],"properties":{"code":{"type":["string","null"],"description":"HTTP status code"},"details":{"description":"Optional additional error details"},"message":{"type":"string","description":"Error message describing what went wrong"}}}}},"paths":{"/v2/slurm/checkpoint/job":{"post":{"tags":["Actions (Slurm)"],"summary":"Checkpoint job","operationId":"checkpoint_slurm_job","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckpointSlurmJob"}}},"required":true},"responses":{"200":{"description":"Returns the id for the task","content":{"text/plain":{"schema":{"type":"string"}}}},"404":{"description":"Failed to find checkpointable resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Failed to connect/fetch from jobs table from database","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}}}}
```

## POST /v2/slurm/restore/job

> Restore job

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-staging"},"tags":[{"name":"Actions (Slurm)","description":"Cedana API for actions (Slurm)"}],"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"type":"http","scheme":"bearer"}},"schemas":{"RestoreSlurmJob":{"type":"object","required":["action_id","cluster_id","reason"],"properties":{"action_id":{"type":"string"},"cluster_id":{"type":"string"},"reason":{"$ref":"#/components/schemas/RestoreReason"}}},"RestoreReason":{"type":"string","enum":["nodeTermination","nodeUnschedulable","manual"]},"ApiError":{"type":"object","description":"Standard error response for API endpoints","required":["message"],"properties":{"code":{"type":["string","null"],"description":"HTTP status code"},"details":{"description":"Optional additional error details"},"message":{"type":"string","description":"Error message describing what went wrong"}}}}},"paths":{"/v2/slurm/restore/job":{"post":{"tags":["Actions (Slurm)"],"summary":"Restore job","operationId":"restore_slurm_job","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestoreSlurmJob"}}},"required":true},"responses":{"200":{"description":"Returns the checkpoint id for the new checkpoint","content":{"text/plain":{"schema":{"type":"string"}}}},"400":{"description":"Failed create checkpoint","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Failed create restore","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Failed to connect/fetch from jobs table from database","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

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

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

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

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