LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

slurmrestd

Slurm REST API interface daemon

TLDR

Start REST API on a port
$ slurmrestd [host]:port
copy
Start on a Unix socket
$ slurmrestd unix:/path/to/socket
copy
Change group ID before processing requests
$ slurmrestd -g [group_id] [host]:port
copy
Specify authentication plugins
$ slurmrestd -a [auth_plugins] [host]:port
copy
Read configuration from file
$ slurmrestd -f [path/to/slurm.conf]
copy
Change user ID before processing
$ slurmrestd -u [user_id] [host]:port
copy
Generate OpenAPI specification
$ slurmrestd --generate-openapi-spec
copy

SYNOPSIS

slurmrestd [OPTIONS]... <[host]:port|unix:/path/to/socket>...

DESCRIPTION

slurmrestd provides a REST API interface to Slurm workload manager. It operates in two modes: Inetd Mode for piped input via inetd, xinetd, or systemd socket activation, and Listen Mode for opening sockets on specified addresses.The daemon supports authentication via local UNIX socket credentials or JWT tokens. Multiple listening endpoints can be specified, including TCP ports and Unix sockets. TLS encryption is supported by prefixing addresses with https://.

PARAMETERS

-a plugin[,plugin]

Comma-delimited list of authentication plugins to load
-d plugin[,plugin]
Data parser plugins for output formatting
-s plugin[,plugin]
OpenAPI plugins determining available endpoints
-f file
Read Slurm configuration from specified file
-g groupid_
Change group ID and drop supplemental groups
-u userid_
Change user ID before processing requests
-t count
Number of processing threads
--max-connections count
Maximum concurrent connections (default: 124)
--generate-openapi-spec
Output JSON OpenAPI schema and exit
--yaml-compact
Output YAML in compact format
--yaml-pretty
Output YAML in pretty readable format
--disable-user-check
Disable check that slurmrestd is not running as root or SlurmUser
-v
Verbose mode (up to 6 levels with -vvvvvv)
-V
Print version information
-h
Display help

CAVEATS

Requires proper Slurm configuration and authentication setup. JWT authentication requires proper key configuration. Running with elevated privileges then dropping to unprivileged user is recommended. API endpoints vary based on loaded plugins and Slurm version.

HISTORY

slurmrestd was added to Slurm in version 20.02 (released 2020) to provide modern REST API access for programmatic cluster interaction. It enables integration with web interfaces, monitoring systems, and automation tools. Maintained by SchedMD as part of the core Slurm distribution. The section number is 8 (system administration).

SEE ALSO

slurmctld(8), sbatch(1), squeue(1), sacct(1)

Copied to clipboard
Kai