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
Query Parameters
  • Configuration management action to execute.
    Allowed Values: [ "save", "verify", "restore" ]
  • 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.
  • 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
  • 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 Top

Response

Supported Media Types

202 Response

The configuration management request was received successfully and is being processed.
Body ()
Root Schema : response
Type: object
Show Source
Nested Schema : data
Type: object
Nested Schema : messages
Type: object

400 Response

The request is malformed or missing required information.
Body ()
Root Schema : response
Type: object
Show Source
Nested Schema : data
Type: object
Nested Schema : messages
Type: object
Show Source

401 Response

The client is not authorized.
Body ()
Root Schema : response
Type: object
Show Source
Nested Schema : data
Type: object
Nested Schema : messages
Type: object
Show Source

403 Response

This request requires the client to have administrator privileges.
Body ()
Root Schema : response
Type: object
Show Source
Nested Schema : data
Type: object
Nested Schema : messages
Type: object
Show Source

404 Response

Resource not found
Body ()
Root Schema : response
Type: object
Show Source
Nested Schema : data
Type: object
Nested Schema : messages
Type: object
Show Source

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".
Body ()
Root Schema : response
Type: object
Show Source
Nested Schema : data
Type: object
Nested Schema : messages
Type: object
Show Source
Back to Top

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>
Back to Top