Hitachi

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


7.1.7 Immediate execution registration API

This API performs immediate execution registration for the specified jobnet.

For details about immediate execution registration, see 4.1.1(1) Immediate 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 immediate 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/registerImmediateExec/invoke httpVersion
Message Body
{
  "parameters":{
    "manager":"manager-host-name-or-IP-address",
    "serviceName":"scheduler-service-name",
    "startCondition":object-of-the-start-condition-parameter,
    "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‒7: List of parameters for the immediate 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

startCondition

object

If you execute a jobnet by using the start condition, specify the start condition parameter object. For details about the start condition parameter object, see 7.3.4 Start condition parameter object.

If you do not specify the start condition, do not specify this parameter, or specify null for this parameter.

--

holding

boolean

Specify whether to hold execution of the jobnet when immediate execution registration is performed. If you want to hold execution, specify true. If you do not want to hold execution, specify false.

If you do not specify this parameter, false is assumed.

--

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.

If you do not want to pass macro variables, do not specify this parameter, or specify null for 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

Immediate execution registration was successful.

400

Bad Request

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

Response format
Response message body
{
  "execID":"execution-ID"
}
Return values

If the status code is 200, the following information is returned:

Member

Data type

Description

execID

string

Returns the execution ID in the format of @[mmmm]{A to Z}nnnn (for example, @10A200). If the start condition is specified, the execution ID of the monitoring generation is returned.

Example 1

The following shows an example of using the API that registers the specified jobnet for immediate execution.

Example request:
POST /ajs/api/v1/objects/definitions/%2FJobGroup%2FJobnet/actions/registerImmediateExec/invoke HTTP/1.1
Host: HOSTW:22252
Accept-Language: ja
Content-type: application/json
X-AJS-Authorization: dXNlcjpwYXNzd29yZA==
 
{
  "parameters":{
    "manager":"HOSTM",
    "serviceName":"AJSROOT1"
  }
}
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
Cache-Control: no-store, no-cache, max-age=0
Date: Wed, 02 Sep 2015 12:57:11 GMT
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Pragma: no-cache
Server: Cosminexus HTTP Server
 
{
  "execID": "@A2895"
}
Example 2

The following shows an example of using the API that registers a jobnet for immediate execution by specifying the start condition parameter (count) and macro variables.

Example request:
POST /ajs/api/v1/objects/definitions/%2FJobGroup%2FJobnet/actions/registerImmediateExec/invoke HTTP/1.1
Host: HOSTW:22252
Accept-Language: ja
Content-type: application/json
X-AJS-Authorization: dXNlcjpwYXNzd29yZA==
 
{
  "parameters":{
    "manager":"HOSTM",
    "serviceName":"AJSROOT1",
    "startCondition":{
      "times":5
    },
    "macro":[{"name":"AJS2KEY1","value":"1"},{"name":"AJS2KEY2","value":"2"}]
  }
}
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
Cache-Control: no-store, no-cache, max-age=0
Date: Wed, 02 Sep 2015 12:59:02 GMT
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Pragma: no-cache
Server: Cosminexus HTTP Server
 
{
  "execID": "@A2897"
}
Example 3

The following shows an example of using the API that holds execution of a jobnet during registration for immediate execution.

Example request:
POST /ajs/api/v1/objects/definitions/%2FJobGroup%2FJobnet/actions/registerImmediateExec/invoke HTTP/1.1
Host: HOSTW:22252
Accept-Language: ja
Content-type: application/json
X-AJS-Authorization: dXNlcjpwYXNzd29yZA==
 
{
  "parameters":{
    "manager":"HOSTM",
    "serviceName":"AJSROOT1",
    "holding":true
  }
}
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
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
 
{
  "execID": "@A100"
}