Cisco Prime Infrastructure API
Prime Infrastructure API Documentation

PUT configure/device/maintenanceMode

Sets the device maintenance mode. This resource is intended for use with routers, switches, wireless controllers, autonomous access points, and other types of devices except for unified access points. For unified access points, please use "PUT op/configure/ap/maintenanceMode" To get the current management status and the maintenance mode reason for a device, see the "managementStatus" and "collectionDetail" response parameters from the "GET data/Devices" resource.

Since Product Version: 3.4

Resource Information

Rate Limiting?

Yes

Sorting?

No

Paging?

No

Filtering?

No

Group Filtering?

No

Aggregation?

No

Response Formats

xml

json

User Group

NBI Write

HTTP Methods

PUT

DevNet Discussions

Resource URL

/webacs/api/v4/op/configure/device/maintenanceMode

Request Payload Parameters

Attribute Description

deviceIds Long[]

List of device IDs. Can be retrieved with the response parameter 'id' from the "GET data/Devices" resource.

maintenanceMode Boolean

If true the maintenance mode will be on, if false the maintenance mode will be off. If the parameter is not specified it will be false.

reason String

Reason for moving devices into the maintenance mode. Optional.

This attribute will be ignored if the attribute 'maintenanceMode' is false.

Response Parameters

Attribute Description

message String

Message with the result information

results MaintenanceModeResultDTO[]

List of operation results

Sample Payloads

Sample payloads are for information only. They are automatically generated and the values included may not be representative of actual valid data values.

Sample XML Request Payload

https://localhost/webacs/api/v4/op/configure/device/maintenanceMode

<?xml version="1.0" ?>
<deviceMaintenanceModeConfigDTO>
  <deviceIds>
    <deviceId>15</deviceId>
    <deviceId>25</deviceId>
  </deviceIds>
  <maintenanceMode>true</maintenanceMode>
  <reason>String value</reason>
</deviceMaintenanceModeConfigDTO>

Sample JSON Request Payload

https://localhost/webacs/api/v4/op/configure/device/maintenanceMode.json

{
  "deviceMaintenanceModeConfigDTO" : {
    "deviceIds" : {
      "deviceId" : [ 15, 25 ]
    },
    "maintenanceMode" : true,
    "reason" : "String value"
  }
}

Sample XML Response Payload

https://localhost/webacs/api/v4/op/configure/device/maintenanceMode

<?xml version="1.0" ?>
<mgmtResponse responseType="operation" requestUrl="https://localhost/webacs/api/v4/op/configure/device/maintenanceMode" rootUrl="https://localhost/webacs/api/v4/op">
  <maintenanceModeResultsDTO>
    <message>String value</message>
    <results>
      <result>
        <id>15</id>
        <message>String value</message>
      </result>
      <result>
        <id>25</id>
        <message>Another string value</message>
      </result>
    </results>
  </maintenanceModeResultsDTO>
</mgmtResponse>

Sample JSON Response Payload

https://localhost/webacs/api/v4/op/configure/device/maintenanceMode.json

{
  "mgmtResponse" : {
    "@requestUrl" : "https://localhost/webacs/api/v4/op/configure/device/maintenanceMode",
    "@responseType" : "operation",
    "@rootUrl" : "https://localhost/webacs/api/v4/op",
    "maintenanceModeResultsDTO" : [ {
      "message" : "String value",
      "results" : {
        "result" : [ {
          "id" : 15,
          "message" : "String value"
        }, {
          "id" : 25,
          "message" : "Another string value"
        } ]
      }
    } ]
  }
}