Hitachi

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


5.17.2 Get definition file

Description

Retrieves JP1/IM - Manager or JP1/IM - Agent defined File.

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/getFile 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.

[
  "filelist":[
    {
      "filename": "File Name",
      "filepath": "absolute path of File"
    }, ...
  ],
  "hostCategory":"host type",
  "managerHostName":"Defined file destination agent host management destination manger host name",
  "agentHostName":"Defined file destination Agent host name"
]
Parameters

Here are the parameters that you specify for message body of the request:

Parameter

Optional

Description

filename

No

Specifies file name.

filepath

No

Specifies the absolute location of file. If the absolute path including file name in file path exceeds 200 characters, the result is error.

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, obtain file of the manager host for JP1/IM.

  • When hostCategory is "Agent"

    Specifies the manager host name of JP1/IM that manages agent to which file is to be acquired, from 1 to 255.

agentHostName

See Description column

  • When hostCategory is "Manager"

    Ignores the specified item.

  • When hostCategory is "Agent"

    Define file specifies agent host to retrieve from, 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.

400

KAJY68105-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.

If the definition file that you want to retrieve does not exist and you can create a compressed definition file (if you try to retrieve more than one file and some files do not exist), you can find file that failed to retrieve in definition file properties file in the compressed zip file.

Response

If the status code is 200, the file data of the definition file compressed in zip format is returned to the response body.

As a response header, setup the following:

Content-Type:application/zip
Content-Disposition: attachment; filename="File name of definition file compressed in zip format"

The other response headers are the same as API's common spec. For the response header of common spec of API, see 5.2.5(2) Response header.

Return values
  • When the status code is 200

    In message body of the response, the file data of the definition file compressed in zip format is returned.

  • 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/getFile  HTTP/1.1
Authorization:Bearer anAxYWRtaW46TUdGa01tTTJNMlV3TURFNFh6STNYekE0T2pJME9qTXpYMTlmWDE5ZlgxOWZYMTlmWDE5ZlgycHdNV0ZrYldsdUlDQWdJQ0FnSUNBZ0lDQWdJQ0FnSUNBZ0lDQWdJQ0Fn
Accept-Language: ja
Content-Type: application/json
Content-Length: 1024000
Accept: application/zip
{
  "filelist":[
    {
      "filename": "jpc_imagent.json",
      "filepath": "C:\\Program Files\\Hitachi\\jp1ima\\conf",
    }, ...
  ],
  "hostCategory":"Agent",
  "managerHostName":"immanager",
  "agentHostName":"imagent"
}
Response:
HTTP/1.1 200 OK
Content-Type:application/zip
Content-Disposition: attachment; filename="C:\Program Files\Hitachi\jp1ima\tmp\upload\imagenthost_UUID.zip"
... (omitted) ...