For the complete documentation index, see llms.txt. This page is also available as Markdown.

Jobs (Slurm)

Cedana API for jobs (Slurm)

List jobs

get

Returns SLURM jobs from the database. Supports filtering by job_ids (comma-separated list) and cluster_id

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
job_idsstring · nullableOptional

Comma-separated list of SLURM job ids to filter by

cluster_idstring · nullableOptional

Cluster id (UUID) to filter by

Responses
200

Returns jobs

application/json

SlurmJob represents a SLURM job stored in the database

accountstring · nullableOptional
cluster_idstringOptional
derived_ecinteger · nullableOptional

Numeric derived exit code (slurmdbd derived_ec — uint32, widened to i64)

derived_esstring · nullableOptional

Human-readable exit reason (e.g. "Preempted by higher-priority job")

end_timeinteger · nullableOptional

Unix epoch seconds; 0 means not yet ended

exit_codeinteger · nullableOptional
failed_nodestring · nullableOptional

Node that triggered job failure, if any

idinteger · int64Optional
job_idinteger · int64Optional
kill_requidinteger · nullableOptional

UID that issued the kill/preempt signal (uid_t / uint32, widened to i64)

namestringOptional
nodesstringOptional
num_cpusinteger · nullableOptional
num_nodesinteger · nullableOptional
partitionstring · nullableOptional
priorityinteger · int64Optional
start_timeinteger · int64Optional

Unix epoch seconds; 0 means not set

state_reason_previnteger · nullableOptional

Reason code for prior state transition

statusstringOptional
submit_timeinteger · int64Optional

Unix epoch seconds; 0 means not set

time_suspendedinteger · nullableOptional

Seconds the job spent suspended

work_dirstring · nullableOptional
get/v1/slurm/jobs
GET /v1/slurm/jobs HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
  {
    "account": null,
    "cluster_id": "text",
    "derived_ec": null,
    "derived_es": null,
    "end_time": null,
    "exit_code": null,
    "failed_node": null,
    "id": 1,
    "job_id": 1,
    "kill_requid": null,
    "name": "text",
    "nodes": "text",
    "num_cpus": null,
    "num_nodes": null,
    "partition": null,
    "priority": 1,
    "start_time": 1,
    "state_reason_prev": null,
    "status": "text",
    "submit_time": 1,
    "time_suspended": null,
    "work_dir": null
  }
]

Sync jobs

post

Receives a batch of SLURM jobs from the cedana-slurm plugin and upserts them into the database

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body

Sync request containing a batch of jobs

cluster_idstring · uuidRequired
Responses
200

Jobs synced successfully

text/plain
stringOptional
post/v1/slurm/jobs/sync
POST /v1/slurm/jobs/sync HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 63

{
  "cluster_id": "123e4567-e89b-12d3-a456-426614174000",
  "jobs": []
}
text

List jobs (paginated)

get

Returns SLURM jobs from the database with pagination

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
offsetinteger · int64Optional

Number of records to skip (default: 0)

limitinteger · int64Optional

Maximum number of records to return (default: 50, max: 100)

Responses
200

Returns jobs

application/json

SlurmJob represents a SLURM job stored in the database

accountstring · nullableOptional
cluster_idstringOptional
derived_ecinteger · nullableOptional

Numeric derived exit code (slurmdbd derived_ec — uint32, widened to i64)

derived_esstring · nullableOptional

Human-readable exit reason (e.g. "Preempted by higher-priority job")

end_timeinteger · nullableOptional

Unix epoch seconds; 0 means not yet ended

exit_codeinteger · nullableOptional
failed_nodestring · nullableOptional

Node that triggered job failure, if any

idinteger · int64Optional
job_idinteger · int64Optional
kill_requidinteger · nullableOptional

UID that issued the kill/preempt signal (uid_t / uint32, widened to i64)

namestringOptional
nodesstringOptional
num_cpusinteger · nullableOptional
num_nodesinteger · nullableOptional
partitionstring · nullableOptional
priorityinteger · int64Optional
start_timeinteger · int64Optional

Unix epoch seconds; 0 means not set

state_reason_previnteger · nullableOptional

Reason code for prior state transition

statusstringOptional
submit_timeinteger · int64Optional

Unix epoch seconds; 0 means not set

time_suspendedinteger · nullableOptional

Seconds the job spent suspended

work_dirstring · nullableOptional
get/v1/slurm/jobs_paginated
GET /v1/slurm/jobs_paginated HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
  {
    "account": null,
    "cluster_id": "text",
    "derived_ec": null,
    "derived_es": null,
    "end_time": null,
    "exit_code": null,
    "failed_node": null,
    "id": 1,
    "job_id": 1,
    "kill_requid": null,
    "name": "text",
    "nodes": "text",
    "num_cpus": null,
    "num_nodes": null,
    "partition": null,
    "priority": 1,
    "start_time": 1,
    "state_reason_prev": null,
    "status": "text",
    "submit_time": 1,
    "time_suspended": null,
    "work_dir": null
  }
]

Last updated

Was this helpful?