All Supported Releases
First, you can check the isManaged attribute (0x1295d) of the particular device model by using its MODEL_HANDLE in the following GET request:
http://<ONECLICK_HOST_IP>:<PORT>/spectrum/restful/model/<MODEL_HANDLE>?attr=0x1295d
This should return something similar to:
<model-response-list xmlns="http://www.ca.com/spectrum/restful/schema/response" total-models="1" throttle="1" error="EndOfResults">
<model-responses>
<model mh="<MODEL_HANDLE>"
<attribute id="0x1295d">1</attribute>
</model>
</model-responses>
</model-response-list>
If the model is Normal (GREEN), then the value returned for attribute id 0x1295d should be 1 as per the above example.
Then to change the model to maintenance mode, you would have to change the value of the isManaged (0x1295d) attribute from Yes (1) to No (0) using a PUT call:
http://<ONECLICK_HOST_IP>:<PORT>/spectrum/restful/model/<MODEL_HANDLE>?attr=0x1295d&val=0
ttp://<OC_host>:<port>/spectrum/restful/action/0x10093?mh=0x1000018&attr=0&val= <IP Address>&attr=1&val=<IP Address>
<action-response xmlns="http://www.ca.com/spectrum/restful/schema/response" error="Success"> <attribute id="0x129fa">0x1000502</attribute> <attribute id="0x129fa">0x10005cb</attribute> </action-response>