Download File from Server REST Service

Use the Download File from Server REST Service to download specific file such as server certificate, backup file, and archive file, from the IBM Security Guardium Key Lifecycle Manager server.

Operation
GET
URL
https://host:port/SKLM/rest/v1/filetransfer/download/objectfiles?fileName={Name_of_File}

By default, Guardium Key Lifecycle Manager server listens to the secure port 9443 (HTTPS) for communication. During IBM Security Guardium Key Lifecycle Manager installation, you can modify this default port.

Request

Request Parameters
Parameter Description
host Specify the IP address or hostname of the IBM Security Guardium Key Lifecycle Manager server.
port Specify the port number on which the IBM Security Guardium Key Lifecycle Manager server listens for requests.
Request Headers
Header name Value
Content-Type application/octet-stream
Accept application/json
Authorization SKLMAuth userAuthId=<authIdValue>
Accept-Language Any valid locale that is supported by IBM Security Guardium Key Lifecycle Manager. For example: en or de
Query parameter

JSON object with the following specification:

Property name Description
fileName Required. Specify the name of the file that you want to download from the server. Ensure that you provide the file name with the complete relative path within the SKLM_Data folder. If the file exists in the SKLM_DATA folder, then no file path needs to be provided.

Response

Response Headers
Header name Value and description
Status Code
200 OK
The request was successful. The response body contains the requested representation.
400 Bad Request
The authentication information was not provided in the correct format.
401 Unauthorized
The authentication credentials were missing or incorrect.
404 Not Found Error
The processing of the request fails.
500 Internal Server Error
The processing of the request fails because of an unexpected condition on the server.
Content-Type application/octet-stream
Content-Language Locale for the response message.
Error Response Body

JSON object with the following specification.

JSON property name Description
code Returns the application error code.
messageId Returns the status message identifier.
status Returns a message that describes the error.

Example

Download a server certificate
GET https://localhost:port/SKLM/rest/v1/filetransfer/download/objectfiles?fileName=ssl.cer
Success response
Status: 200 OK
File content of the downloaded file
Error response
{
    "code": "1",
    "messageId": "CTGKM3462E",
    "status": "CTGKM3462E File /opt/IBM/WebSphere/Liberty/products/sklm/data/ssl.cer path is invalid."
}