Using Spectrum Web Services to set maintenance mode

Document ID : KB000069160
Last Modified Date : 07/08/2018
Show Technical Document Details
Introduction:

Did you know that you can use Spectrum Web Services to place a model into, or out of, maintenance mode?

Instructions:

Description: How to use Spectrum Web Services to set the isManaged attribute on a model.

Solution: The two examples below use different methods to utilize Spectrum’s Web Services to toggle maintenance mode on a model. The first is a command line implementation. In this case, cURL is used as the command line tool:

To put a device into maintenance mode:

curl.exe -i -H "application/xml" -X PUT -u username:password “http://localhost/spectrum/restful/model/0xa0000fa0?attr=0x1295d&val=false” 


To take a device out of maintenance mode:

curl.exe -i -H "application/xml" -X PUT -u username:password "http://localhost/spectrum/restful/model/0xa0000fa0?attr=0x1295d&val=true"

*Both commands above are one line each

The second example uses the RESTClient (see figure 1).

User-added image

 
Additional Information:

Note: If using curl, ensure you use the correct version of cURL  for your Spectrum environment.  cURL versions are available with or without SSL support.   

 

Additional Information:

Tuesday Tip: Using Spectrum Web Services to set maintenance mode

https://communities.ca.com/thread/99043995