Operates queues registered with Systemwalker Operation Manager.
The following operations are available.
Endpoint | HTTP | Operation details |
---|---|---|
/v1/queues/{queuename} | GET | Gets information for the specified queue. |
POST | Operates the specified queue. | |
PUT | Temporarily changes the definition of the specified queue. | |
/v1/queues | GET | Gets a list of project information. |
The fields of the objects in the queues resource are as below.
If you specify a queue that is unique in the system, specify the queue name in the SE version. For EE versions, specify the subsystem number and queue name.
Filed Name | Type | Specification |
---|---|---|
host | String | Host name of the connection destination |
subsystem | Numeric | Subsystem number |
queuename | String | Queue name |
status | List | Queue status |
maxexec | Numeric | Multiplicity |
run | Numeric | Number of running jobs |
que | Numeric | Number of jobs waiting to be executed |
hold | Numeric | Number of jobs pending execution |
qprty | Numeric | Execution priority |
dprty | Numeric | Degree of execution priority |
maxjob | Numeric | Number of jobs that can be submitted |
elapse | Numeric | Elapsed time limit |
hostgroup | String | Host group name |
Function Description
Get the target queue information by sending a request for the GET method with the queues resource.
Privilege/Execution Environment Required
If the Systemwalker Operation Manager preference restricts users to the Systemwalker Operation Manager, you must have the privileges of a user belonging to the swadmin group. If you are not restricted to using Systemwalker Operation Manager, you can use it with ordinary user privileges.
Requests
GET
/v1/subsystems/{subsystem}/queues/{queuename}
/v1/queues/{queuename} (If you omit the subsystem number)
Under Path Parameters, specify the following parameters.
Parameter | How to specify | Type | Specification |
---|---|---|---|
subsystem | Path | Numeric | Specify the subsystem number (from 0 to 9) on which the target queue resides. If you omit the subsystem number, the value is 0. |
queuename(*) | Path | String | Specify the target queue name. |
(*):Required Parameters
Path: Path parameters
Response
Returns the following HTTP status codes.
Code | Specification |
---|---|
200 | Processing of the request was successful. |
401 | The credential is specified incorrectly. |
403 | You are not a user in the swadmin group. |
404 | The target queue does not exist.
|
500 | An error occurred on the server while processing the request. |
Returns an object from the queues resource.
Usage Examples
An example of using the API to get a project with subsystem number 0 and queue name "queue1" is as follows. Note that the response example shows the objects of the queues resource that are stored in the data field, and the response header and other fields are omitted.
GET /Systemwalker-omgr/api/v1/subsystems/0/queues/queue1 HTTP/1.1 Host: Systemwalker Operation Manager server hostname:9900 Authorization: Basic ********************
{ "host": "Systemwalker Operation Manager server hostname", "subsystem": 0, "queuename": "queue1", "status": "ACT", "maxexec": 256, "run": 0, "que": 0, "hold": 0, "qprty": 31, "dprty": 2, "maxjob": -1, "elapse": 0, "hostgroup": "hostgroup1" }
Function Description
The queue definition is temporarily changed by sending a request for the PUT method with the queues resource.
Privilege/Execution Environment Required
You must have system administrator (user/superuser belonging to the Administrators group) privileges.
Requests
PUT
/v1/subsystems/{subsystem}/queues/{queuename}
/v1/queues/{queuename} (If you omit the subsystem number)
Under Path Parameters and Request Body, specify the following parameters.
Parameter | How to specify | Type | Specification |
---|---|---|---|
subsystem | Path | Numeric | Specify the subsystem number (from 0 to 9) on which the target queue resides. If you omit the subsystem number, the value is 0. |
queuename(*) | Path | String | Specify the target queue name. |
maxexec | Body | Numeric | Specify the multiplicity (Number of concurrent executions). Range is from 1 to 999. |
qprty | Body | Numeric | Specify the execution priority. Range is from 0 to 63. |
dprty | Body | Numeric | Specify the degree of execution priority. The range is from 0 to 4 for Windows and -20 to 19 for Linux. |
maxjob | Body | Numeric | Specify the number of jobs that can be submitted. Range is from 1 to 999. |
elapse | Body | Numeric | Specify the elapsed time limit. Range is from 1 to 99999999. |
(*):Required Parameters
Path: Path parameters
Body: Request bodies
Response
Returns the following HTTP status codes.
Code | Specification |
---|---|
200 | Processing of the request was successful. |
400 | The request parameter is invalid.
|
401 | The credential is specified incorrectly. |
403 | You are not a system administrator. |
404 | The target queue does not exist.
|
500 | An error occurred on the server while processing the request. |
Returns objects from the specified queues resource.
Cautionary Notes
Changes made to queue attributes are retained until job execution control is started in initialization mode. When job execution control is started in initialization mode, the settings for distributed execution are changed to those defined in the initialization file.
At least one parameter must be specified for the request body.
Usage Examples
The following example shows how to use the API to increase the queue multiplicity to 99 and the number of submitted jobs to 200 for subsystem number 0 and queue name "queue1".
PUT /Systemwalker-omgr/api/v1/subsystems/0/queues/queue1 HTTP/1.1 Host: Systemwalker Operation Manager server hostname:9900 Authorization: Basic ******************** Content-Type: application/json { "maxexec": 99, "maxjob": 200 }
Returns an object in the queues resource with multiplicity changed to 99 and the number of submitted jobs changed to 200. Refer to the response example of the "17.3.4.1 Getting Queue Information".
Function Description
Operate (stop/start) the target queue by sending a request for the POST method with the resource.
Privilege/Execution Environment Required
You must have system administrator (user/superuser belonging to the Administrators group) privileges.
Requests
POST
/v1/subsystems/{subsystem}/queues/{queuename}
/v1/queues/{queuename} (If you omit the subsystem number)
Under Path Parameters and Request Body, specify the following parameters.
Parameter | How to specify | Type | Specification |
---|---|---|---|
subsystem | Path | Numeric | Specify the subsystem number (from 0 to 9) on which the target queue resides. If you omit the subsystem number, the value is 0. |
queuename(*) | Path | String | Specify the target queue name. |
control(*) | Body | List | Specify the operation type for the queue. start: Start the queue. stop: Stop the queue. |
(*):Required Parameters
Path: Path parameters
Body: Request bodies
Response
Returns the following HTTP status codes.
Code | Specification |
---|---|
200 | Processing of the request was successful. |
400 | The request parameter is invalid.
|
401 | The credential is specified incorrectly. |
403 | You are not a system administrator. |
404 | The target queue does not exist.
|
500 | An error occurred on the server while processing the request. |
Returns objects from the specified queues resource.
Usage Examples
The following is an example of using the API to stop a queue with subsystem number 0 and queue name "queue 2".
POST /Systemwalker-omgr/api/v1/subsystems/0/queues/queue2 HTTP/1.1 Host: Systemwalker Operation Manager server hostname:9900 Authorization: Basic ******************** Content-Type: application/json { "control": "stop" }
Refer to the response example of the "17.3.4.1 Getting Queue Information".
Function Description
Get a list of queues resources.
Privilege/Execution Environment Required
If the Systemwalker Operation Manager preference restricts users to the Systemwalker Operation Manager, you must have the privileges of a user belonging to the swadmin group. If you are not restricted to using Systemwalker Operation Manager, you can use it with ordinary user privileges.
Requests
GET
/v1/queues
Common query parameters are available.
For more information, refer to the "17.2.3.2 Request Format".
Response
Returns the following HTTP status codes.
Code | Specification |
---|---|
200 | Processing of the request was successful. |
400 | The request parameter is invalid.
|
401 | The credential is specified incorrectly. |
403 | Not a user privilege belonging to the swadmin group. |
500 | An error occurred on the server while processing the request. |
Returns an object from the queues resource.
Usage Examples
The following is an example of how to use the API to get a list of queues with subsystem number 0.
GET /Systemwalker-omgr/api/v1/queues?subsystem=0 HTTP/1.1 Host: Systemwalker Operation Manager server hostname:9900 Authorization: Basic ********************
Returns an object from the queues resource as an array of objects in the data field. For the objects in the queues resource, refer to the response example of the "17.3.4.1 Getting Queue Information".