(Click to open topic with navigation)
This section describes behavior of the Job Array object in Moab Web Services. It contains the URLs, request bodies, and responses delivered to and from MWS.
The Fields: Job Arrays reference section contains the type and description of all fields in the Job Array object.
Supported methods
Resource | GET | PUT | POST | DELETE |
---|---|---|---|---|
/rest/job-arrays | -- | -- | Submit Job Array | -- |
This topic contains these sections:
The HTTP POST method is used to submit Job Arrays.
Quick reference
POST http://localhost:8080/mws/rest/job-arrays?api-version=3[&proxy-user=<username>]
While the Job Array resource only gives access to create job arrays, job arrays are retrieved using the operations in Getting Job Information.
Restrictions
All restrictions present for Submitting Jobs are present for job arrays. In addition, job arrays are only supported if the ENABLEJOBARRAYS parameter is set to TRUE in the moab.cfg file. For example:
ENABLEJOBARRAYS TRUE
URLs and parameters
POST http://localhost:8080/mws/rest/job-arrays?api-version=3[&proxy-user=<username>]
Parameter | Required | Type | Valid values | Description |
---|---|---|---|---|
proxy-user | No | String | -- | Perform this action as this user. |
See Global URL Parameters for available URL parameters.
Request body
To submit a job array, only two fields are required: jobPrototype and one of indexValues or indexRanges. Both index ranges and values may be specified if desired.
The request body below shows all the fields that are available during job array submission, although the jobPrototype shown is a simple example and does not utilize all fields of a job submission.
The jobPrototype field has the same properties as a typical job submission. Consequently the api-version of the job array will apply to the jobPrototype like it does when you submit jobs, so the api-version in the call must match the api-version of the job. Examples of this can be seen in Submitting Jobs.
JSON request body ------------------------------------ { "name": "myarray", "indexRanges": [ { "startIndex": 11, "endIndex": 25, "increment": 2 }], "indexValues": [ 2, 4, 6, 8, 10 ], "slotLimit": 2, "cancellationPolicy": { "firstJob": "FAILURE", "anyJob": "SUCCESS" }, "jobPrototype": { "commandFile": "/tmp/test.sh", "initialWorkingDirectory": "/tmp", "requirements": [{"taskCount": 4}] } }
Sample response
The response of this task is the same as submitting a job (see Submit Job).
Related Topics