POST /switches/configurationData
Use this method to import a switch configuration-data file from the local system into Lenovo XClarity Administrator or back up configuration data for one or more RackSwitch or Flex System switches. When backing up configuration data, the switch configuration data is imported into Lenovo XClarity Administrator from the target switch as a configuration-data file.
Authentication
Authentication with username and password is required.
Request URL
POST https://{management_server_IP}/switches/configurationData
Query parameters
None
Request body
Attributes | Required / Optional | Type | Description | ||
---|---|---|---|---|---|
action | Required | String | The action to perform. This can be the following value:
| ||
targets | Required | Array of objects | Information about each target to be restored. | ||
description | Optional | String | Description of the configuration-data file. If a description is not specified, the following default text is used: | ||
filename | Optional | String | Name of the configuration-data file. For CNOS devices, the file name can contain alphanumeric characters and the following special characters: underscore (_), hyphen (-) and period (.). For ENOS switches, the file name can contain alphanumeric characters and any special characters. If a file name is not specified, the following default name is used: | ||
overwirte | Optional | Boolean | Indicates whether to overwrite an existing switch-configuration file with the same name. This can be one of the following values.
Note If you do not specify this attribute and a switch-configuration file with the same name already exists, the backup process fails. | ||
uuid | Required | String | UUID of the switches to be backed up. To obtain the switch UUIDs, use the GET /switches method. |
{
"action": "backup",
"targets" : [{
"description" : " Switch1 configuration"
"filename" : "Switch1.cfg",
"overwirte" : true,
"uuid" : "00000000000010008000A897DCF7FC00"
},
{
"description" : " Switch2 configuration"
"filename" : "Switch2.cfg",
"overwirte" : true,
"uuid" : "A1A9642D7D763A8096A9F1657FB07929",
}]
}
Attributes | Required / Optional | Type | Description | ||
---|---|---|---|---|---|
fileSize | Required | String | The size of the configuration-data file to be imported (in bytes). | ||
uploadedfile | Required | Object | Information about the configuration-data file being imported. | ||
fileName | Required | String | Name of the configuration-data file. For CNOS devices, the file name can contain alphanumeric characters and the following special characters: underscore (_), hyphen (-) and period (.). For ENOS switches, the file name can contain alphanumeric characters and any special characters. |
Response codes
Code | Description | Comments |
---|---|---|
200 | OK | The request completed successfully. |
400 | Bad Request | A 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. |
403 | Forbidden | The orchestrator server was prevented from fulfilling the request. A descriptive error message is returned in the response body. Ensure that you have privileges to perform the request. |
409 | Conflict | There is a conflict with the current state of the resource. A descriptive error message is returned in the response body. |
500 | Internal Server Error | An internal error occurred. A descriptive error message is returned in the response body. |
Response body
Attributes | Type | Description | ||
---|---|---|---|---|
result | String | The results of the request. This can be one of the following values.
| ||
messages | Array | Information about one or more messages. | ||
explanation | String | Additional information to clarify the reason for the message. | ||
recovery | Array | Recovery information | ||
text | String | User actions that can be taken to recover from the event. | ||
URL | String | Link to the help system for more information, if available. | ||
statusCode | String | The response code. | ||
statusDescription | String | Description of the response code. | ||
text | String | Message text associated with the message identifier. |
{
"result": "success",
"messages": [{
"explanation": "",
"recovery": {
"text": "text here",
"URL": "URL here"
},
"statusCode": 200,
"statusDescription": "File imported successfully",
"text": "".
"uuid": "00000000000010008000A897DCF7FC00"
}]
}
{
"result": "success",
"messages": [{
"explanation": "",
"recovery": {
"text": "text here",
"URL": "URL here"
},
"statusCode": 200,
"statusDescription": "File imported successfully",
"text": "".
"uuid": "A1A9642D7D763A8096A9F1657FB07929"
}]
}