Skip to main content

POST /files/managementServer/data

Use this method to import a Lenovo XClarity Administrator backup.

To import a backup, complete the following steps.

  1. Import the backup using POST /files/managementServer/data?action=import. You must specify the passphrase to import the file.

  2. Validate the backup and make it available for later use using POST /files/managementServer/data?action=process.

Authentication

Authentication with username and password is required.

Request URL

POST https://{management_server_IP}/files/managementServer/data

Query parameters

AttributesRequired / OptionalDescription
actionRequiredAction to take. This can be one of the following values.
  • import. Upload a backup package to the XClarity Administrator repository.

  • process. Validate the backup package for integrity and compatibility, and prepare the backup for later use.

The following example imports the backup to the XClarity Administrator.
POST https:// 192.0.2.0/files/managementServer/data?action=import
The following example validates and prepares the backup file.
POST https:// 192.0.2.0/files/managementServer/data?action=process

Request body

The request body differs depending on the value of the action query parameter.

action=import
Use the "multipart/form-data" media type to import the backup package. Use the attributes in the following table as the multipart name in the body. For more information about the multipart/form-data media type, see Returning Values from Forms: multipart/form-data webpage.
AttributesRequired / OptionalTypeDescription
filenameRequiredStringName of the backup file to import

For example:

HTTP Header
Content-Type: multipart/form-data; boundary=AaB03x

Request body

--AaB03x
Content-Disposition: form-data; name=" uploadedfile";
filename=" LXCA_backup_Jul20.tar"
Content-Type: application/x-tar
--AaB03x--

action=process
Specify a JSON object with the following attribute.
AttributesRequired / OptionalTypeDescription
passphraseRequiredStringPackage passphrase that was specified by the user

For example:

{
"passphrase": "xxxxxxxxxx"
}

Response codes

CodeDescriptionComments
200OKThe request completed successfully.
201CreatedOne or more new resources were successfully created.
400Bad RequestA query parameter or request attribute is missing or not valid, or the operation is not supported. A descriptive error message is returned in the response body.
401UnauthorizedThe user cannot be authenticated. Authentication has not been provided or has failed. A descriptive error message is returned in the response body.
500Internal Server ErrorAn internal error occurred. A descriptive error message is returned in the response body.

Response body

AttributesTypeDescription
resultStringResults of the request. This can be one of the following values.
  • success. The request completed successfully.
  • failed. The request failed. A descriptive error message was returned.
  • warning. The request completed with a warning. A descriptive error message was returned.
messagesArray of objectsInformation about one or more messages
 idStringMessage identifier of a returned message
 textStringMessage text associated with the message identifier
 explanationStringAdditional information to clarify the reason for the message
 recoveryArray of objectsRecovery information
  textStringUser actions that can be taken to recover from the event
  URLStringLink to the help system for more information, if available
The following example is returned if the request is successful.
{
"result": "success",
"message": []
}