Save, verify or restore a configuration
put
/rest/{version}/configuration/management
Executes configuration management action to either save, verify or restore a configuration. A restore can be executed from different sources, including a specified file in the /code/bkups directory. The client making the request must already possess the configuration lock or the request fails. This is an asynchronous request where the client must poll the system for the final result. If the request is received successfully, the immediate response to the client (202) simply indicates that the request was received and is being processed. The links section of the response includes the REST resource the client should use to poll for the final result.
Request
Path Parameters
-
version: string
For this release, the value is "v1.0".
Query Parameters
-
action: string
Configuration management action to execute.Allowed Values:
[ "save", "verify", "restore" ]
-
filename(optional): string
When the restoreType parameter is "backupFile", this parameter must specify a valid backup file located in the /code/bkups directory. The value should be the filename only; specifying a path in the filename results in an error.
-
restoreSource(optional): string
Only valid when action is "restore". Specifies the source of the configuration to be used for the restore.Allowed Values:
[ "running", "saved", "backupFile" ]
Header Parameters
-
Authorization:
The value in the Authorization header must be the string "Bearer <access token>", where <access token> is a valid, unexpired token received in response to a prior /auth/token request.
There's no request body for this operation.
Back to TopResponse
Supported Media Types
- application/xml
202 Response
The configuration management request was received successfully and is being processed.
Nested Schema : data
Type:
object
Nested Schema : messages
Type:
object
400 Response
The request is malformed or missing required information.
Nested Schema : data
Type:
object
Nested Schema : links
Type:
object
401 Response
The client is not authorized.
Nested Schema : data
Type:
object
Nested Schema : links
Type:
object
403 Response
This request requires the client to have administrator privileges.
Nested Schema : data
Type:
object
Nested Schema : links
Type:
object
404 Response
Resource not found
Nested Schema : data
Type:
object
Nested Schema : links
Type:
object
423 Response
The request requires the configuration lock and failed because the client does not currently own the lock. If another client or user currently owns the configuration lock, the error message is "Resource locked by another user". If no client or user owns the configuration lock, the error message is "User does not have the lock".
Nested Schema : data
Type:
object
Nested Schema : links
Type:
object
Examples
The following example shows how to save, verify or restore a configuration by submitting a PUT request on the REST resource using cURL. For more information about cURL, see Use cURL
curl -X PUT -H 'Accept: application/xml' -H 'Authorization: Bearer <token>' \ 'https://10.0.0.2/rest/v1.0/configuration/management?action=restore&restoreSource=backupFile&filename=backupRunningConfig.gz'
Example of the Response Headers
The following shows an example of the response headers.
HTTP/1.1 202 Accepted Date: Thu, 20 Sep 2018 18:06:04 GMT Cache-Control: no-cache Content-Length: 184 Content-Type: application/xml Connection: keep-alive Keep-Alive: timeout=60, max=99 Last-Modified: Thu, 20 Sep 2018 18:06:04 GMT X-Appweb-Seq: 27
Example of the Response Body
The following example shows the contents of the response body in XML format.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <response> <data/> <messages/> <links> <link>https://10.0.0.2/rest/v1.0/admin/asyncstatus</link> </links> </response>
After receiving that response, check the status of the asynchronus action by making a GET request to the /rest/v1.0/admin/asyncstatus endpoint.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <response> <data> <operationState> <operation>restore</operation> <status>success</status> </operationState> </data> <messages/> <links/> </response>