Save, verify or restore a configuration
https://{managementIp}/rest/{version}/configuration/management
Request
-
version: string
REST API version string.
Available values: v1.1
-
action: string
Configuration management action.
Available values: save, verify, restoreAllowed 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.
Available values: running, saved, backupFileAllowed Values:[ "running", "saved", "backupFile" ]
-
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/rest/{version}/auth/token
request.
There's no request body for this operation.
Back to TopResponse
- application/xml
202 Response
object
object
400 Response
object
object
-
link(optional):
string
If available, a message with possible valid API URL(s) for the client to invokeExample:
Available URL(s) message string
object
-
errorMessage(optional):
string
Example:
Error message string
401 Response
object
object
-
link(optional):
string
If available, a message with possible valid API URL(s) for the client to invokeExample:
Available URL(s) message string
object
-
errorMessage(optional):
string
Example:
Error message string
403 Response
object
object
-
link(optional):
string
If available, a message with possible valid API URL(s) for the client to invokeExample:
Available URL(s) message string
object
-
errorMessage(optional):
string
Example:
Error message string
404 Response
object
object
-
link(optional):
string
If available, a message with possible valid API URL(s) for the client to invokeExample:
Available URL(s) message string
object
-
errorMessage(optional):
string
Example:
Error message string
423 Response
object
object
-
link(optional):
string
If available, a message with possible valid API URL(s) for the client to invokeExample:
Available URL(s) message string
object
-
errorMessage(optional):
string
Example:
Error message string
Examples
Example of Accessing the API with cURL
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 \
--header "Accept: application/xml" \
--header "Authorization: Bearer $TOKEN" \
"https://10.0.0.2/rest/v1.1/configuration/management?action=verify"
Note:
If using 'action=restore', set 'restoreSource' to either 'running', 'saved', or 'backupFile'. And if you are restoring from a backup file, set the value of the 'filename' query parameter to the name of the backup file in the /code/bkups directory that you want to restore.Example of Accessing the API with Python
The following example shows how to save, verify or restore a configuration by submitting a PUT request on the REST resource using Python. This example assumes you have a valid token stored in the token
variable. For an example of authenticating with Python, see Authenticate.
import requests
headers = { "Accept":"application/xml", "Authorization":"Bearer " + token }
url = "https://10.0.0.2/rest/v1.1/configuration/management?action=verify"
resp = requests.put(url, headers=headers)
Example of the Response Headers
The following shows an example of the response headers.
HTTP/1.1 202 Accepted
Date: Mon, 14 Jan 2019 22:16:35 GMT
Cache-Control: no-cache
Content-Length: 184
Content-Type: application/xml
Connection: keep-alive
Keep-Alive: timeout=60, max=99
Last-Modified: Mon, 14 Jan 2019 22:16:35 GMT
X-Appweb-Seq: 125
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.1/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.1/admin/asyncstatus endpoint.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response>
<data>
<operationState>
<operation>verify</operation>
<status>success</status>
</operationState>
<additionalInfo>
<verifySummary numCriticals="0" numErrors="0" numWarnings="0"/>
</additionalInfo>
</data>
<messages/>
<links/>
</response>