Hitachi

JP1 Version 13 JP1/Automatic Job Management System 3 Command Reference


7.1.19 Wait status change API

This API function temporarily changes the wait status of a unit with wait conditions (whether a unit with wait conditions is still waiting for the end of the waiting-target unit).

For details about changing wait statuses, see 2.2.5 Using wait conditions to control the order of unit execution in the JP1/Automatic Job Management System 3 System Design (Work Tasks) Guide.

You can use this API function if the version of JP1/AJS3 - Web Console is 12-50 or later. Before you use this API function, execute the version number acquisition API function and confirm that the return value (productVersionNumber) is 125000 or larger.

Execution privileges

The logged-in JP1 user must have one of the following JP1 permissions for the unit whose wait statuses are to be changed:

  • JP1_AJS_Admin privileges

  • JP1_AJS_Manager privileges

  • JP1_AJS_Operator privileges

Request format
Request line
POST /application/component/apiVersion/objects/waiting/unitName:execID/actions/changeWaiting/invoke httpVersion
Message Body
{
  "parameters":{
    "manager":"manager-host-name-or-IP-address",
    "serviceName":"scheduler-service-name",
    "waitingTargetUnitName":"full-name-of-unit-being-waited-for",
    "waitingStatusAction":"whether-to-enable-waiting"
  }
}
API version

v1

Information that uniquely identifies a resource

The table below describes the information that uniquely identifies a resource.

If a parameter is not specified or is specified incorrectly, an error with the status code 404 occurs because the resource cannot be uniquely identified.

Information that uniquely identifies a resource

Data type

Description of the value

Required?

unitName

string

Specify the full name of the unit to be requested, by using a character string in the range from 1 to 930 bytes.

Y

execID

string

Specify the execution ID by using a character string in the format of @[mmmm]{A to Z}nnnn (for example, @10A200).

Y

Parameter

The following table lists and describes the parameters that can be specified for parameters in the request message body.

Table 7‒19: List of parameters for the Wait status change API

Parameter

Data type

Description of the value

Required?

manager

string

Specify the manager host name or IP address by using a character string in the range from 1 to 255 bytes.

Y

serviceName

string

Specify the scheduler service name by using a character string in the range from 1 to 30 bytes.

Y

waitingTargetUnitName

string

Specify the full name of the unit being waited for, by using a character string in the range from 1 to 930 bytes.

Y

waitingStatusAction

string

Specify whether to enable or disable waiting by using a character string constant that is supported by the WaitingStatusAction constant. For details about the WaitingStatusAction constant, see 7.4.13(4) WaitingStatusAction.

Y

Status code

The following table lists and describes the status codes returned as a response:

Status code

Text description

Description

200

OK

The wait status was changed successfully.

400

Bad Request

The argument is invalid.

401

Unauthorized

Authentication is required.

403

Forbidden

The operator does not have execution permission.

404

Not found

The operator does not have access permission for the resource, or the resource does not exist.

409

Conflict

The processing cannot be continued because the request is inconsistent with the current resource status.

412

Precondition failed

The Web Console server is not available.

500

Server-side error

A processing error occurred in the Web Console server.

Return values

None (The size of the response message body is 0 bytes.)

Example

The following shows an example of using the API to change the wait status.

Example request:
POST /ajs/api/v1/objects/waiting/%2FJobGroup%2FJobnet01:%40A104/actions/changeWaiting/invoke HTTP/1.1
Host: HOSTW:22252
Accept-Language: ja
Content-Type: application/json
X-AJS-Authorization: dXNlcjpwYXNzd29yZA==
 
{
  "parameters":{
    "manager":"HOSTM",
    "serviceName":"AJSROOT1",
    "waitingTargetUnitName":"/JobGroup/Jobnet02",
    "waitingStatusAction":"DISABLE"
  }
}