7.1.28 Execution agent status change API
This API changes the status of an execution agent that is registered on the manager host. You can also specify multiple execution agents to change their statuses.
If the job distribution delay reduction function is enabled, you can change the statuses of execution agents. If the function is disabled, errors are returned for all execution agent operation results.
For details about job distribution delay reduction function, see 2.5.5 Considering reduction of job distribution delay in the JP1/Automatic Job Management System 3 System Design (Configuration) Guide.
You can use this API function only if the version of JP1/AJS3 - Web Console is 12-50 or later and the version of the connection-destination JP1/AJS3 - Manager is 12-50 or later. Before you use this API function, confirm that: the return value (productVersionNumber) of the version information acquisition API function is 125000 or larger; and the return value (protocolVersionNumber) of the JP1/AJS3 - Manager protocol version acquisition API function is 1250 or larger.
- Execution privileges
-
The logged-in JP1 user must have one of the following JP1 permissions:
-
JP1_JPQ_Admin privileges
-
JP1_JPQ_Operator privileges
-
- Request format
-
- Request line
POST /application/component/apiVersion/objects/execAgents/actions/changeComStatus/invoke httpVersion
- Message Body
{ "parameters":{ "manager":"manager-host-name-or-IP-address", "comStatus":"execution-agent-status", "execAgents":["execution-agent-name",...] } }
- API version
-
v1
- Information that uniquely identifies a resource
-
None
- Parameter
-
The following table lists and describes the parameters that can be specified for parameters in the request message body.
Table 7‒28: List of parameters for the Execution agent status change 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
comStatus
string
Specify the status of an execution agent by using a character string constant that is supported by the ComStatus constant.
For details about the ComStatus constant, see 7.4.14(2) ComStatus.
Y
execAgent
string[]
Specify the names of the execution agents as a string array.
You can specify a maximum of 100 execution agents.
Each execution agent name must be a character string in the range from 1 to 255 bytes.
Y
- Status code
-
The following table lists and describes the status codes returned as a response:
Status code
Text description
Description
200
OK
The statuses of execution agents were changed successfully.
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.
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
{ "results":[Execution-agent-operation-result-object] }
- Return values
-
If the status code is 200, the following information is returned:
Member
Data type
Description
results
object[]
Returns an array of the execution agent operation result objects. The number of array elements is the same as the number of elements in the array specified for the execAgents parameter.
Also, if the command terminates abnormally on the manager host, a non-zero value is stored as the result code of the target processing and KNAK3696-E is stored as a message in the returned array.
For details about the execution agent operation result object, see 7.3.6 Execution agent operation result object.
- Cautionary note
-
Even if an error has occurred in JP1/AJS3 - Web Console, the operation on the execution agent might be successful on the manager host.
- Example
-
The following shows an example of using the API to change the status of an execution agent.
- Example request:
POST /ajs/api/v1/objects/execAgents/actions/changeComStatus/invoke HTTP/1.1 Host: HOSTW:22252 Accept-Language: ja Content-Type: application/json X-AJS-Authorization: dXNlcjpwYXNzd29yZA== { "parameters":{ "manager":"HOSTM", "comStatus":"UNAVAILABLE", "execAgents":["AGT01"] } }
- Example response (message body):
{ "results": [ { "rtnCode":"0", "output":null, "execAgent":"AGT01" } ] }