Update the Configuration on a Device

post

/rest/{versionId}/configuration/devices/{deviceId}/action

Use this (POST) method to push a device configuration stored on the SDM database to the device and ensure that it is properly activated and used as the running configuration for the device. Actions such as save, activate, and save and activate are supported.

Request

Supported Media Types
Path Parameters
Body ()
Root Schema : deviceAction
Type: object
Show Source
Back to Top

Response

Supported Media Types

200 Response

successful operation
Body ()
Root Schema : saveActivateResult
Type: object
Show Source

400 Response

The user input is invalid.

401 Response

The session ID is invalid.

404 Response

The object (resource URI, device, and so on) of your input request cannot be found.
Back to Top

Examples

The following example shows how to apply an action on a specified managed device by submitting a POST request on the REST resource using cURL. For more information about cURL, see Use cURL

<curl>

Example of cURL Data

The following shows an example of cURL data sent with the request.

curl -v -b sessionid.txt -X POST -d@device/saveActivate.xml -H"Content-Type: application/xml" -H"Accept: application/xml" http://localhost:8080/rest/v1.1/configuration/devices/ID9/action

Example of Request Body

The following shows an example of the user request body input in XML format.

<?xml version="1.0" encoding="UTF-8"?>
<deviceAction>
   <type>SaveActivateConfig</type>
</deviceAction>

Example of Response Header

The following shows an example of the response header.

HTTP/1.1 200 OK
Date: Tue, 12 Sep 2017 20:38:30 GMT
Server: Apache
X-Frame-Options: SAMEORIGIN
Content-Length: 742
Vary: Accept-Encoding
Content-Type: application/xml

Example of Response Body

The following example shows the contents of the response body in XML format.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<saveActivateResult>
  <action>SaveActivateConfig</action>
  <isActivateConfigSuccess>SUCCESS</isActivateConfigSuccess>
  <isCreateSuccess>SUCCESS</isCreateSuccess>
  <isDeviceFirmwareChangedFailure>false</isDeviceFirmwareChangedFailure>
  <isEraseCacheSuccess>Not Applicable</isEraseCacheSuccess>
  <isIntegrityCheckSuccess>SUCCESS</isIntegrityCheckSuccess>
  <isLockSuccess>SUCCESS</isLockSuccess>
  <isRestoreConfigSuccess>Not Applicable</isRestoreConfigSuccess>
  <isSaveConfigSuccess>SUCCESS</isSaveConfigSuccess>
  <isUnlockSuccess>SUCCESS</isUnlockSuccess>
  <isValidationSuccess>SUCCESS</isValidationSuccess>
  <status>SUCCESS</status>
  <taskId>admin-2017-09-12-20-38-30-897-10.196.0.194</taskId>
</saveActivateResult>
Back to Top