REST API  14
REST API for Luna Network HSMs
GET /users/{userid}/files/{fileid}/download

GET /users/{userid}/files/{fileid}/download

Download the file owned by the currently logged in user in the archive format.

User Privileges

Users with the following role privileges can perform this command:

  • admin
  • operator
  • monitor

Parameters

userid

The identifier of a user.

Use: Required

JSON Schema:

   Object
   type: string

fileid

The identifier of a file. Can only contain alphanumeric characters, hyphens, and underscores.

Use: Required

JSON Schema:

    Object
    type: string

Responses

200

A binary stream that represents the file. This archive is in compressed tar format (tgz).

JSON Schema:

        <binary stream>

400

SERVERPLUGIN_INVALID_PATTERN_DETECTED

One of the provided values has an inappropriate format.

SERVERPLUGIN_INTERNAL_ERROR

Unexpected error

403

SERVERPLUGIN_USERID_NOT_AUTHORIZED

Loggedin user isn't allowed to perform this action for this userid.

SERVERPLUGIN_USERID_RESERVED_FOR_SYSTEM_USE

Operation can not be done for system level users.

404

SERVERPLUGIN_USERID_DOES_NOT_EXIST

User does not exist.

SERVERPLUGIN_FILEID_DOES_NOT_EXIST

File does not exist.

Example Request

   GET
   https://1.2.3.4:8443/users/admin/files/supportInfo.txt/download
   { }

Example Response

A binary stream, in compressed format containing the file.

Notes

Name of the downloaded file depends on the REST API client, and is configurable. The user needs to untar the file to get the original file.