7.1.5 Planned execution registration API
This API performs planned execution registration of the specified jobnets.
For details about planned execution registration, see 4.1.1(2) Planned execution in the manual JP1/Automatic Job Management System 3 Overview.
- Execution privileges
-
The login JP1 user must have one of the following JP1 permissions for the unit for which planned execution registration is performed:
-
JP1_AJS_Admin privileges
-
JP1_AJS_Manager privileges
-
JP1_AJS_Operator privileges
-
- Request format
-
- Request line
POST /application/component/apiVersion/objects/definitions/unitName/actions/registerPlannedExec/invoke httpVersion
- Message Body
{ "parameters":{ "manager":"manager-host-name-or-IP-address", "serviceName":"scheduler-service-name", "passedDaemonStarts":"behavior-when-the-planned-time-has-passed-at-the-startup-of-the-scheduler-service", "passedRegForExe":"behavior-when-the-planned-time-has-passed-at-execution-registration", "holding":whether-to-hold-execution-of-the-jobnet, "macro":[macro-variable-object,...] } }
- 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
- 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‒5: List of parameters for the planned execution registration 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
passedDaemonStarts
string
Specify the behavior when the planned time has passed at the startup of the scheduler service, by using a character string constant specified for the PlannedTimePassedType constant. For details about the PlannedTimePassedType constant, see 7.4.3(1) PlannedTimePassedType.
The setting of this parameter is valid only when the startup mode of the scheduler service is warm start or disaster recovery start.
Y
passedRegForExe
string
Specify the behavior when the planned time has passed at execution registration, by using a character string constant specified for the PlannedTimePassedType constant. For details about the PlannedTimePassedType constant, see 7.4.3(1) PlannedTimePassedType.
Y
holding
boolean
Specify whether to hold execution of the jobnet when planned execution registration is performed. If you want to hold execution, specify true. If you do not want to hold execution, specify false.
If you specify true, hold is set for execution generations that are created when execution registration is performed.
If you do not specify this parameter, false is assumed.
You can specify this parameter only when the JP1/AJS3 - Web Console version is 11-10 or later and the version of connection-destination JP1/AJS3 - Manager is 11-10 or later. Before specifying this parameter, make sure that the return value of the version information acquisition API (productVersionNumber) is 111000 or greater. Also, make sure that the return value of the API (protocolVersionNumber) that acquires the protocol version of JP1/AJS3 - Manager is 1110 or greater.
For details about the version information acquisition API, see 7.1.37 Version information acquisition API.
For details about the JP1/AJS3 - Manager protocol version acquisition API, see 7.1.38 JP1/AJS3 - Manager protocol version acquisition API.
--
macro
object[]
Specify the information to be set for the macro variables used by the jobs under the root jobnet, in the format of an array of the objects of the macro variables.
For details about the macro variable object, see 7.3.5 Macro variable object.
You can specify a maximum of 32 macro variables. If you specify multiple macro variables, ensure that the value of number-of-bytes-for-the-macro-variable-names + number-of-bytes-for-the-passing-information + 4 becomes 4,085 or less. If you specify the same macro variable multiple times, the passing information of the macro variable that is specified for the first time is passed.
Specify this parameter only if you want to pass the macro variables. If you do not want to pass the macro variables, specify null for this parameter, or do not specify this parameter.
--
- Legend:
-
Y: Required
--: Optional
- Status code
-
The following table lists and describes the status codes returned as a response:
Status code
Message
Description
200
OK
Planned execution registration 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 1
-
The following shows an example of using the API that registers the specified jobnets for planned execution.
- Example request:
POST /ajs/api/v1/objects/definitions/%2FJobGroup%2FJobnet/actions/registerPlannedExec/invoke HTTP/1.1 Host: HOSTW:22252 Accept-Language: ja Content-type: application/json X-AJS-Authorization: dXNlcjpwYXNzd29yZA== { "parameters":{ "manager":"HOSTM", "serviceName":"AJSROOT1", "passedDaemonStarts":"IMMEDIATE", "passedRegForExe":"IMMEDIATE" } }
- Example response:
HTTP/1.1 200 OK Content-Type: text/plain Cache-Control: no-store, no-cache, max-age=0 Date: Wed, 02 Sep 2015 12:36:35 GMT Expires: Thu, 01 Jan 1970 00:00:00 GMT Pragma: no-cache Server: Cosminexus HTTP Server
- Example 2
-
The following shows an example of using the API that registers jobnets for planned execution by specifying macro variables.
- Example request:
POST /ajs/api/v1/objects/definitions/%2FJobGroup%2FJobnet/actions/registerPlannedExec/invoke HTTP/1.1 Host: HOSTW:22252 Accept-Language: ja Content-type: application/json X-AJS-Authorization: dXNlcjpwYXNzd29yZA== { "parameters":{ "manager":"HOSTM", "serviceName":"AJSROOT1", "passedDaemonStarts":"IMMEDIATE", "passedRegForExe":"IMMEDIATE", "macro":[{"name":"AJS2KEY1","value":"1"},{"name":"AJS2KEY2","value":"2"}] } }
- Example response:
HTTP/1.1 200 OK Content-Type: text/plain Cache-Control: no-store, no-cache, max-age=0 Date: Wed, 02 Sep 2015 12:38:04 GMT Expires: Thu, 01 Jan 1970 00:00:00 GMT Pragma: no-cache Server: Cosminexus HTTP Server
- Example 3
-
The following shows an example of using the API that holds starting the first execution of a jobnet during registration for planned execution.
- Example request:
POST /ajs/api/v1/objects/definitions/%2FJobGroup%2FJobnet/actions/registerPlannedExec/invoke HTTP/1.1 Host: HOSTW:22252 Accept-Language: ja Content-type: application/json X-AJS-Authorization: dXNlcjpwYXNzd29yZA== { "parameters":{ "manager":"HOSTM", "serviceName":"AJSROOT1", "passedDaemonStarts":"IMMEDIATE", "passedRegForExe":"IMMEDIATE", "holding":true } }
- Example response:
HTTP/1.1 200 OK Content-Type: text/plain Cache-Control: no-store, no-cache, max-age=0 Date: Mon, 08 Aug 2016 09:39:28 GMT Expires: Thu, 01 Jan 1970 00:00:00 GMT Pragma: no-cache Server: Cosminexus HTTP Server