Top
Systemwalker Operation Manager  Reference Guide
FUJITSU Software

17.3.4 queues resources

Operates queues registered with Systemwalker Operation Manager.

The following operations are available.

Endpoint
(After /Systemwalker-omgr/api)

HTTP
Method

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
ACT: Queue is running
INACT: Queue is stopping

maxexec

Numeric

Multiplicity
If there is no limit, -1 will be returned.

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
If there is no limit, -1 will be returned.

elapse

Numeric

Elapsed time limit
If there is no limit, 0 will be returned.

hostgroup

String

Host group name
If not specified, returns "*".

17.3.4.1 Getting Queue Information

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

HTTP Methods

GET

Request URI

/v1/subsystems/{subsystem}/queues/{queuename}

/v1/queues/{queuename} (If you omit the subsystem number)

Request Parameters

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

Status Codes

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.

  • The target queue does not exist on the system.

  • The path parameter is specified incorrectly.

500

An error occurred on the server while processing the request.

Response Body

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.

Request Example
GET /Systemwalker-omgr/api/v1/subsystems/0/queues/queue1 HTTP/1.1
Host: Systemwalker Operation Manager server hostname:9900
Authorization: Basic ********************
Response Example
{
  "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"
}

17.3.4.2 Temporarily Changing Queue Definitions

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

HTTP Methods

PUT

Request URI

/v1/subsystems/{subsystem}/queues/{queuename}

/v1/queues/{queuename} (If you omit the subsystem number)

Request Parameters

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

Status Codes

Returns the following HTTP status codes.

Code

Specification

200

Processing of the request was successful.

400

The request parameter is invalid.

  • Required parameter is not specified.

  • You have specified a parameter that does not need to be specified.

  • The specified parameter value is invalid.

401

The credential is specified incorrectly.

403

You are not a system administrator.

404

The target queue does not exist.

  • The target queue does not exist on the system.

  • The path parameter is specified incorrectly.

500

An error occurred on the server while processing the request.

Response Body

Returns objects from the specified queues resource.

Cautionary Notes

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".

Request Example
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
}
Response Example

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".

17.3.4.3 Operating Queues

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

HTTP Methods

POST

Request URI

/v1/subsystems/{subsystem}/queues/{queuename}

/v1/queues/{queuename} (If you omit the subsystem number)

Request Parameters

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.

  • Required parameter is not specified.

  • You have specified a parameter that does not need to be specified.

  • The specified parameter value is invalid.

401

The credential is specified incorrectly.

403

You are not a system administrator.

404

The target queue does not exist.

  • The target queue does not exist on the system.

  • The path parameter is specified incorrectly.

500

An error occurred on the server while processing the request.

Response Body

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".

Request Example
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"
}
Response Example

Refer to the response example of the "17.3.4.1 Getting Queue Information".

17.3.4.4 Getting a list of 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

HTTP Methods

GET

Request URI

/v1/queues

Request Parameters

Common query parameters are available.

For more information, refer to the "17.2.3.2 Request Format".

Response

Status Codes

Returns the following HTTP status codes.

Code

Specification

200

Processing of the request was successful.

400

The request parameter is invalid.

  • You have specified a parameter that does not need to be specified.

  • You have specified the same query parameter more than once.

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.

Response Body

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.

Request Example
GET /Systemwalker-omgr/api/v1/queues?subsystem=0 HTTP/1.1
Host: Systemwalker Operation Manager server hostname:9900
Authorization: Basic ********************
Response Example

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".