7.1.2 Unit information acquisition API
This API acquires information about a specified unit. If the user who logged in does not have reference permissions for the specified unit, the user cannot use the API to acquire information about the unit.
This API can be used only if the version of JP1/AJS3 - Web Console is 11-50 or later. Before using this API, run the version information acquisition API, and confirm that its return value (productVersionNumber) is 115000 or more.
- Execution privileges
-
The logged in user must have one of the following JP1 permissions for the unit whose information is to be acquired:
-
JP1_AJS_Admin privileges
-
JP1_AJS_Manager privileges
-
JP1_AJS_Editor privileges
-
JP1_AJS_Operator privileges
-
JP1_AJS_Guest privileges
-
- Request format
-
- Request line
GET /application/component/apiVersion/objects/statuses/unitName:execID?query httpVersion
- 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 query.
Table 7‒2: List of parameters for the unit information acquisition API Parameter
Description of the value
Required?
manager
Specify the manager host name or IP address by using a character string in the range from 1 to 255 bytes.
Y
serviceName
Specify the scheduler service name by using a character string in the range from 1 to 30 bytes.
Y
searchConnectInfo
Use a character string constant specified for the ConnectInfoType constant to specify whether to obtain connection information, when obtaining the Status information object (unitStatus) of the Resource for status monitoring. For details about the ConnectInfoType constant, see 7.4.16(1) ConnectInfoType.
If you do not specify this parameter, NO (do not obtain connection information) is assumed.
You can specify this parameter only if the version of JP1/AJS3 - Web Console is 12-50 or later. Before you specify this parameter, execute the version number acquisition API function and confirm that the return value (productVersionNumber) is 125000 or larger. For details about the version information acquisition API, see 7.1.37 Version information acquisition API.
--
- 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 unit information was successfully acquired.
400
Bad Request
The query character string 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
resource-for-status-monitoring
- Return values
-
If the status code is 200, the resource for status monitoring is returned. For details about the resources for status monitoring, see 7.2.1 Resource for status monitoring.
- Example
-
The following shows an example of using the API to acquire the information for the specified unit.
- Example request:
GET /ajs/api/v1/objects/statuses/%2FJobGroup%2FJobnet:@A119?manager=HOSTM&serviceName=AJSROOT1 HTTP/1.1 Host: HOSTW:22252 Accept-Language: ja X-AJS-Authorization: dXNlcjpwYXNzd29yZA==
- Example response (message body):
{ "definition": { "owner":"user", "parameters":"", "unitID":29444, "simpleUnitName":"Jobnet", "unitType":"ROOTNET", "unitComment":"", "jp1ResourceGroup":"", "unitName":"/JobGroup/Jobnet", "customJobType":"", "execAgent":"", "execFileName":"", "registerStatus":"YES", "scenarioUnit":false, "recoveryUnit":false, "wait":false, "jobnetReleaseUnit":false, "horizontalPosition":-1, "verticalPosition":-1, "rootJobnetName":"/JobGroup/Jobnet" }, "unitStatus": { "status":"NORMAL", "simpleUnitName":"Jobnet", "holdPlan":"NONE", "execHost":"", "delayedStart":"NOT", "holdAttr":"NO", "startTime":"2017-04-20T17:27:10+09:00", "endTime":"2017-04-20T17:27:10+09:00", "delayedStartTime":"", "delayedEnd":"NOT", "delayedEndTime":"", "timeRequiredForExecution":"-1", "unitName":"/JobGroup/Jobnet", "execID":"@A119", "schStartTime":"2017-04-20T00:00:00+09:00", "reStartTime":"", "startDelayStatus":"NO", "nestStartDelayStatus":"NO", "endDelayStatus":"NO", "nestEndDelayStatus":"NO", "startDelayTime":"", "endDelayTime":"", "changeType":"NO", "registerTime":"", "jobNumber":-1, "retCode":"", "executionType":"NONE", "startConditionTimes":-1, "startConditionPeriodType":"NONE", "startConditionPeriod":"", "retryStatus":"NONE", "retryTimes":-1, "execSchedule":"NONE", "statusInSummary": [ "NONE" ], "execDateBaseTime":"", "waiting":"NONE", "monitoringJobnet":"TIME_REQUIRED_FOR_EXECUTION_NO" }, "release":null }