Hitachi

JP1 Version 13 JP1/Integrated Management 3 - Manager Command, Definition File and API Reference


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":"manger-host-name-for-defined-file-list-destination-and-agent-host-management-destination",
  "agentHostName":"agent-host-name-for-defined-file-list-destination"
]
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.

KAJY68126-W

JP1/IM agent control base encountered a warning.

400

KAJY68101-E

Request parameter is invalid.

KAJY68205-E

  • Integrated agent host name specified in the request does not exist in JP1/IM - Manager

  • Logged in as does not have read/manipulate permissions for integrated agent specified in the request

  • The information of the integration agent or the host specified in the request is not in the unified agent host management DB

403

KAJY01000-E

The privilege of the user used for authentication is insufficient.

500

KAJY68104-E

JP1/IM agent control base encountered an error.

KAJY00007-E

System error has occurred (out of disk, out of memory, etc.).

KAJY68203-E

Cannot connect to Intelligent Integrated Management Base.

KAJY68212-E

Cannot connect to JP1/IM agent base.

KAJY68501-E

Unable to connect to the manager's unified agent host management DB.

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.6.5 (1) Function for obtaining list of definition files in the 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": "jp1_imagent",
      "updatetime": "2023-07-21T10:23+09:00",
      "updateaction": "jp1ima\\addon_management\\alertmanager\\addon_jpc_service_reload.bat"
    }, ...
  ],
"errfilelist":[
    {
      "filename": "file_sd_config_test.yml",
      "filepath": "C:\\Program Files\\Hitachi\\jp1ima\\conf",
    }, ...
  ]
}