7.1.13 Change plan (execute immediately) API
This API temporarily changes the execution schedule of the specified jobnet registered for execution, and then immediately executes the jobnet. After execution with the changed schedule, jobs are executed according to the schedule defined for the jobnet.
For details about immediate execution, see 4.5.4 Executing a registered jobnet immediately in the manual JP1/Automatic Job Management System 3 Overview.
You can use this API only when the JP1/AJS3 - Web Console version is 11-10 or later. Before using this API, make sure that the return value of the version information acquisition API (productVersionNumber) is 111000 or greater.
- Execution privileges
-
The logged in JP1 user must have one of the following JP1 permissions for the unit for which the plan is to be temporarily changed (execute immediately):
-
JP1_AJS_Admin privileges
-
JP1_AJS_Manager privileges
-
JP1_AJS_Manager privileges
-
- Request format
-
- Request line
POST /application/component/apiVersion/objects/statuses/unitName:execID/actions/execImmediate/invoke httpVersion
- Message Body
{ "parameters":{ "manager":"manager-host-name-or-IP-address", "serviceName":"scheduler-service-name", "pushedAhead":"behavior-when-the-start-time-is-pushed-ahead", "changeLower":"behavior-at-the-lower-jobnet-start-time" } }
- 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
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
- Legend:
-
Y: Required
- Parameter
-
The following table lists and describes the parameters that can be specified for parameters in the request message body.
Table 7‒13: List of parameters for the change plan (execute immediately) 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
pushedAhead
string
If the start time of the root jobnet is pushed ahead, specify whether the execution schedule is added to the start time before a change, by using a character string constant specified for the ChangePushedAheadType constant.
For details about the ChangePushedAheadType constant, see 7.4.9(2) ChangePushedAheadType.
If you do not specify this parameter or specify null for this parameter, ADD (add to the next schedule) is assumed.
This parameter is valid only when the unit for which the plan is temporarily changed (execute immediately) is a root jobnet. If the unit is not a root jobnet, the specification of this parameter is ignored.
--
changeLower
String
Specify whether to change the start time of nested jobnets under the specified jobnet, by using a character string constant specified for the ChangeLowerType constant.
For details about the ChangeLowerType constant, see 7.4.9(3) ChangeLowerType.
If you do not specify this parameter or specify null for this parameter, NOTSHIFT (the start time of lower jobnets is not changed) is assumed.
--
- Legend:
-
Y: Required
--: Optional
- Status code
-
The following table lists and describes the status codes returned as a response:
Status code
Text description
Description
200
OK
The temporary change to the plan (execute immediately) was successful.
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 that temporarily changes the execution schedule of the specified jobnet, and then immediately executes the jobnet.
- Example request:
POST /ajs/api/v1/objects/statuses/%2FJobGroup%2FJobnet:%40A100/actions/execImmediate/invoke HTTP/1.1 Host: HOSTW:22252 Accept-Language: ja Content-type: application/json X-AJS-Authorization: dXNlcjpwYXNzd29yZA== { "parameters":{ "manager":"HOSTM", "serviceName":"AJSROOT1", "pushedAhead":"ADD", "changeLower":"NOTSHIFT" } }