Hitachi

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


7.1.12 Change plan (change time) API

This API temporarily changes the scheduled execution start time of the specified jobnet registered for execution. After execution with the changed schedule, jobs are executed according to the schedule defined for the jobnet.

For details about temporarily changing the scheduled execution start time, see 4.5.3 Temporarily changing the execution start time of a jobnet 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 (change time):

  • JP1_AJS_Admin privileges

  • JP1_AJS_Manager privileges

  • JP1_AJS_Operator privileges

Request format
Request line
POST /application/component/apiVersion/objects/statuses/unitName:execID/actions/changeStartTime/invoke httpVersion
Message Body
{
  "parameters":{
    "manager":"manager-host-name-or-IP-address",
    "serviceName":"scheduler-service-name",
    "kindTime":"type-of-execution-start-time",
    "absoluteTime":"execution-start-time",
    "relativeSign":"sign-to-specify-relative-execution-start-time",
    "relativeDay":relative-day-to-specify-relative-execution-start-time,
    "relativeTime":"relative-time-to-specify-execution-start-time",
    "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‒12: List of parameters for the change plan (change time) 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

kindTime

string

Specify whether to use the absolute time or relative time to specify the execution start time, by using a character constant specified for ChangeStartTimeType.

For details about the ChangeStartTimeType constant, see 7.4.9(1) ChangeStartTimeType.

Y

absoluteTime#1

string

When the execution start time is specified by using the absolute time, specify the execution start time in YYYY-MM-DDThh:mm format.

Specify the date by using the local date for the scheduler service of the request-destination JP1/AJS3 - Manager.

You can specify the following values:

  • YYYY: specify the year.

    You can specify the year in the range from 1994 to 2036 (unit: year).

  • MM: Specify the month.

    You can specify the month in the range from 01 to 12 (unit: month).

  • DD: Specify the day.

    You can specify the day in the range from 01 to the last day of the specified month (unit: day).

  • hh: Specify the hour.

    You can specify the hour in the range from 00 to 47 (unit: hour).

  • mm: Specify the minute.

    You can specify the minute in the range from 00 to 59 (unit: minute).

You can specify this parameter only when ABSOLUTETIME (specify an absolute time) is specified for the kindTime parameter.

If RELATIVETIME (specify a relative time) is specified for the kindTime parameter, the specification of this parameter is ignored.

--

relativeSign#2

string

When you specify the execution start time relative to the execution start time before a change, select + or - to specify whether to move the execution start time forward or backward.

  • +: Move the execution start time forward.

  • -: Move the execution start time backward.

You can specify this parameter only when RELATIVETIME (specify a relative time) is specified for the kindTime parameter.

If ABSOLUTETIME (specify an absolute time) is specified for the kindTime parameter, the specification of this parameter is ignored.

--

relativeDay#2,#3

int

When you specify the execution start time relative to the execution start time before a change, specify a relative day by using a number in the range from 0 to 99.

Specify the date by using the local date for the scheduler service of the request-destination JP1/AJS3 - Manager.

You can specify this parameter only when RELATIVETIME (specify a relative time) is specified for the kindTime parameter.

If ABSOLUTETIME (specify an absolute time) is specified for the kindTime parameter, the specification of this parameter is ignored.

--

relativeTime#2,#3

string

When you specify the execution start time relative to the execution start time before a change, specify a relative time in hh:mm format.

Specify the time by using the local time for the scheduler service of the request-destination JP1/AJS3 - Manager.

You can specify the following values:

  • hh: Specify the hour.

    You can specify the hour in the range from 00 to 47 (unit: hour).

  • mm: Specify the minute.

    You can specify the minute in the range from 00 to 59 (unit: minute).

You can specify this parameter only when RELATIVETIME (specify a relative time) is specified for the kindTime parameter.

If ABSOLUTETIME (specify an absolute time) is specified for the kindTime parameter, the specification of this parameter is ignored.

--

pushedAhead

string

If the start time of a 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 (change time) 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

#1

To change the date and time by specifying an absolute date and time, you need to specify the absoluteTime parameter. If you omit the parameter (or if null is specified), an error occurs.

#2

To change the date and time by specifying a relative date and time, you need to specify all the relativeSign, relativeDay, and relativeTime parameters. If you omit any of the parameters (or if null is specified), an error occurs.

#3

To change the date and time by specifying a relative date and time, make sure that the relative time is at least 1 minute. If you specify 0 for the relativeDay parameter and specify 00:00 for the relativeTime parameter, an error occurs.

Status code

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

Status code

Message

Description

200

OK

The temporary change to the plan (change time) 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 changes the execution start time of the specified root jobnet by specifying an absolute time.

Example request:
POST /ajs/api/v1/objects/statuses/%2FJobGroup%2FJobnet:%40A100/actions/changeStartTime/invoke HTTP/1.1
Host: HOSTW:22252
Accept-Language: ja
Content-type: application/json
X-AJS-Authorization: dXNlcjpwYXNzd29yZA==
 
{
  "parameters":{
    "manager":"HOSTM",
    "serviceName":"AJSROOT1",
    "kindTime":"ABSOLUTETIME",
    "absoluteTime":"2016-09-07T08:30",
    "pushedAhead":"ADD",
    "changeLower":"NOTSHIFT"
  }
}
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
Example 2

The following shows an example of using the API that changes the execution start time of the specified nested jobnet by specifying a relative time.

Example request:
POST /ajs/api/v1/objects/statuses/%2FJobGroup%2FJobnet%2FNestJobnet:%40A100/actions/changeStartTime/invoke HTTP/1.1
Host: HOSTW:22252
Accept-Language: ja
Content-type: application/json
X-AJS-Authorization: dXNlcjpwYXNzd29yZA==
 
{
  "parameters":{
    "manager":"HOSTM",
    "serviceName":"AJSROOT1",
    "kindTime":"RELATIVETIME",
    "relativeSign":"-",
    "relativeDay":0,
    "relativeTime":"01:00",
    "changeLower":"NOTSHIFT"
  }
}
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
Example 3

The following shows an example of using the API that adds an execution schedule by specifying a nested jobnet without an execution schedule.

Note that if a nested jobnet having an execution schedule is specified, the execution start time will change.

Example request:
POST /ajs/api/v1/objects/statuses/%2FJobGroup%2FJobnet%2FNestJobnet:%40A100/actions/changeStartTime/invoke HTTP/1.1
Host: HOSTW:22252
Accept-Language: ja
Content-type: application/json
X-AJS-Authorization: dXNlcjpwYXNzd29yZA==
 
{
  "parameters":{
    "manager":"HOSTM",
    "serviceName":"AJSROOT1",
    "kindTime":"ABSOLUTETIME",
    "absoluteTime":"2016-09-07T08:30"
  }
}
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