POST Agent Function¶
-
POST
/remotes/run-agent-function
¶ Uses an existing remote sessions to submit a predefined Slycat function to a cluster running SLURM as a job. The session must have been created successfully using
POST /remotes
Request JSON Object: - sid (string) – Unique remote session identifier.
- wckey (string) – Workload characterization key.
- nnodes (int) – Number of nodes requested for the job.
- partition (string) – Name of the partition where the job will be run.
- ntasks_per_node (int) – Number of tasks to run on a node.
- ntasks (int) – Number of tasks allocated for the job.
- ncpu_per_task (int) – Number of CPUs per task requested for the job.
- time_hours (int) – Number of hours requested for the job.
- time_minutes (int) – Number of minutes requested for the job.
- time_seconds (int) – Number of seconds requested for the job.
- fn (string) – Name of the Slycat predefined function.
Status Codes: - 200 OK – The response contains the command, its output and possible errors.
- 400 Bad Request – The request failed due to invalid parameters or a Slycat agent issue.
- 500 Internal Server Error – The request failed due to no Slycat agent present and configured on the remote system.
Response Headers: - Content-Type – application/json
- X-Slycat-Message – For errors, contains a human-readable description of the problem.
Response JSON Object: - jid (int) – Job ID.
- errors (string) – Error information, if any.
Sample Request
POST /remotes/run-agent-function { sid: "505d0e463d5ed4a32bb6b0fe9a000d36", wckey: "user_00001", nnodes: 1, partition: "partition_name", ntasks_per_node: 1, ntasks: 1, ncpu_per_task: 4, time_hours: 0, time_minutes: 5, time_seconds: 0, fn: "slycat_predefined_function" }
Sample Response
{ "jid": 123456, "errors": "" }