5.17.1 Get definition file list
- Description
-
Retrieves a list of defined file for a JP1/IM - Manager or JP1/IM - Agent.
- Execution permissions
-
Following permissions are required:
When specify "Manager" at hostCategory
-
JP1 resource group: *
-
JP1 permission level: JP1_Console_Admin
When specify "Agent" at hostCategory
-
JP1 permission level: JP1_Console_Admin
-
- API version
-
v1
- Format
-
- Request line
POST /application/component/apiVersion/fileOperation/getFileList httpVersion
- Request header
-
Follow the request header in 5.2.3 Request format.
- Request message body
-
Message body of the request can be sent in JSON formats.
[ "hostCategory":"host type", "managerHostName":"Defined file list destination agent host-managed destination manger host name", "agentHostName":"Defined file list destination agent host name" ]
- Parameters
-
Here are the parameters that you specify for message body of the request:
Parameter
Optional
Description
hostCategory
No
Specify "Manager" or "Agent" as host type. Performs an action on the defined file of the specified host type.
managerHostName
See Description column
-
When hostCategory is "Manager"
Ignores the specified item. Assuming that your host is the manager host for JP1/IM, get a list of file defined for the manager host in JP1/IM.
-
When hostCategory is "Agent"
Specifies the manager Host name of JP1/IM that manages agent to which File list is to be acquired, from 1 to 255.
agentHostName
See Description column
-
When hostCategory is "Manager"
Ignores the specified item.
-
When hostCategory is "Agent"
Specifies agent host of file list destination, in the range of 1 to 255.
-
- Status codes
-
The following table describes the status codes that are returned as a response to the request:
Status code
Message
Description
200
--
API operation was successful.
KAJY02058-W
The format of the user-created definition file list definition file is incorrect.
KAJY68102-W
The file described in the user-created definition file list definition file does not exist. The application-supplied File does not exist.
KAJY68103-W
The length of file or file path exceeds the maximum.
There are no required settings.
The category name is invalid (the length of the string exceeds the upper limit or begins with "jp1_").
The length of the character string for the definition import operation exceeds the upper limit.
A file is specified that cannot be defined in the user-created definition file list definition file.
400
KAJY68101-E
Request parameter is invalid.
403
KAJY01000-E
The privilege of the user used for authentication is insufficient.
500
KAJY68104-E
JP1/IM agent control base encountered an error.
500
KAJY00007-E
System error has occurred (out of disk, out of memory, etc.).
- Return values
-
-
When the status code is 200
Message body of the response returns the auto ResponseAction definition object described in 7.2.4(1) Auto Response Action definition Object.
For the format of the data, see "3.3.5 (1) List of defined file" in "integrated agent action execute function" in JP1/IM - Agent in the manual JP1/Integrated Management 3 - Manager Overview and System Design Guide. The parts that differ from JP1/IM - Agent are shown below.
Member name
Description
errfilelist:message
Describes message ID and message body of the error message. If it succeeds, omit this item.
Setup message of KAJY68102-W,KAJY68103-W.
message:errmessage
Describes message ID and message body of the error message. If successful, omit message entry. Setup message of KAJY02058-W.
-
When the status code is other than 200
In message body of the response, the exception object in the response format described in 5.2.6 Error response message when an error occurs is returned.
-
- Examples
-
- Request:
POST http://hostname:20703/im/api/v1/fileOperation/getFileList HTTP/1.1 Authorization:Bearer anAxYWRtaW46TUdGa01tTTJNMlV3TURFNFh6STNYekE0T2pJME9qTXpYMTlmWDE5ZlgxOWZYMTlmWDE5ZlgycHdNV0ZrYldsdUlDQWdJQ0FnSUNBZ0lDQWdJQ0FnSUNBZ0lDQWdJQ0Fn Accept-Language: ja Content-Type: application/json Content-Length: 1024000 Accept: application/json { "hostCategory":"Agent", "managerHostName":"immanager", "agentHostName":"imagent" }- Response:
HTTP/1.1 200 OK Content-Type:application/json ... (omitted) ... { "filelist":[ { "filename": "jpc_alertmanager.yml", "filepath": "C:\\Program Files\\HITACHI\\jp1ima\\conf", "filecategoryID": "jp1_imagent", "filecategoryName": "imagent", "updatetime": "2022-01-11T03:38", "updateaction": "cmd.exe /c C:\\Program Files\\HITACHI\\jp1ima\\addon_management\\alertmanager\\addon_jpc_reload.bat" }, ... ], "errfilelist":[ { "filename": "file_sd_config_test.yml", "filepath": "C:\\Program Files\\HITACHI\\jp1ima\\conf", }, ... ] }