I have been able to use REST calls to check the status of the “isManaged” property once I query the Model Handle #.
GET: http://<spectrum_server:port>/spectrum/rest/model/<0xModel_handle#>?attr=0x1295d"
Which returns a True or False for that Device.
I want to:
- Create a Schedule for Maintenance
- Add (or Remove) some Devices to that Schedule
I’m trying to reproduce the TEC1301311 [http://www.ca.com/us/support/ca-support-online/product-content/knowledgebase-articles/tec1301311.aspx] using REST instead of CLI.
I tried to convert the TEC doc instructions from CLI to REST using something like this POST:
http://<spectrum_server:port>/spectrum/restful/model?mtypeid=0x10456&attr_id=0x12bbc&val=ScheduleTest1&attr_id=0x1298f&val=19&attr_id=0x12993&val=3600&attr_id=0x129e4&val=12&attr_id=0x12992&val=10&attr_id=0x129e3&val=116&attr_id=0x12994&val=6
[See TEC1301311 for Full details on the Attributes & Values I picked for this Maintenance Schedule.]
0x12bbc Description : "ScheduleTest1"
0x1298f SCHED_Start_Hour : 19 ==> 7 pm
0x12993 SCHED_Duration : 3600 ==> 3600 sec = 1 hour, so from 7pm to 8pm
0x129e4 SCHED_Start_Day : 12
0x12992 SCHED_Start_Month : 10 ==> Oct
0x129e3 SCHED_Start_Year : 116 ==> 2016 (117 means 2017, 118 means 2018 etc.)
0x12994 SCHED_Recurrence : 6 ==> Once (2 means daily, 3 means weekly, 4 means monthly, 5 means yearly)
I get errors like: attr and val parameters are not proportionate
Once I get this part working, then I need to figure out the Web call to create the association to Add the Devices to the Maintenance Window.
I’ve been trying both via a Rest Client & via a PowerShell script. The other RESTFUL calls I make work with getting the Model Handle and getting various properties of individual devices. I just haven't figured out how to get this schedule created.
I only see general docs on CA Spectrum Web Services API (RESTFUL), but nothing specific to creating Schedules for Maintenance Mode.
Anyone know how to do this correctly via the Spectrum Web Services API? (I'm using 10.1.1)