Jobs (Slurm)
Cedana API for jobs (Slurm)
Returns SLURM jobs from the database. Supports filtering by job_ids (comma-separated list) and cluster_id
Comma-separated list of SLURM job ids to filter by
Cluster id (UUID) to filter by
Returns jobs
SlurmJob represents a SLURM job stored in the database
Numeric derived exit code (slurmdbd derived_ec — uint32, widened to i64)
Human-readable exit reason (e.g. "Preempted by higher-priority job")
Unix epoch seconds; 0 means not yet ended
Node that triggered job failure, if any
UID that issued the kill/preempt signal (uid_t / uint32, widened to i64)
Unix epoch seconds; 0 means not set
Reason code for prior state transition
Unix epoch seconds; 0 means not set
Seconds the job spent suspended
Invalid query parameters
Failed to fetch from database
Client error
Server error
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
}
]Receives a batch of SLURM jobs from the cedana-slurm plugin and upserts them into the database
Sync request containing a batch of jobs
Jobs synced successfully
Failed to sync jobs to database
Client error
Server error
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": []
}textReturns SLURM jobs from the database with pagination
Number of records to skip (default: 0)
Maximum number of records to return (default: 50, max: 100)
Returns jobs
SlurmJob represents a SLURM job stored in the database
Numeric derived exit code (slurmdbd derived_ec — uint32, widened to i64)
Human-readable exit reason (e.g. "Preempted by higher-priority job")
Unix epoch seconds; 0 means not yet ended
Node that triggered job failure, if any
UID that issued the kill/preempt signal (uid_t / uint32, widened to i64)
Unix epoch seconds; 0 means not set
Reason code for prior state transition
Unix epoch seconds; 0 means not set
Seconds the job spent suspended
Failed to fetch from database
Client error
Server error
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?