Original Message:
Sent: Mar 15, 2023 07:06 AM
From: Luc Christiaens
Subject: api command to activate existing maintenance schedule
This is an example that works (for me), goal to set in maint every Monday for 3600 seconds
{
"name": "test monday",
"description": "Duration: 3600 seconds From: 2023-03-15 12:04:59",
"start_date_time": {
"month": "03",
"day": "15",
"year": "2023",
"timestamp": {
"hours": "12",
"minutes": "04",
"seconds": "59"
}
},
"end_time": {
"type": "duration",
"end_date_time": {
"month": "",
"day": "",
"year": "",
"timestamp": {
"hours": "",
"minutes": "",
"seconds": ""
}
},
"duration": {
"hours": "1",
"minutes": "0",
"seconds": "0"
}
},
"recurrence_pattern": "weekly",
"recurrence_period": "1",
"recurrence_days_of_the_week": "monday",
"recurrence_day_of_the_month": "",
"recurrence_instance": "",
"recurrence_end_date_time": {
"month": "",
"day": "",
"year": "",
"timestamp": {
"hours": "",
"minutes": "",
"seconds": ""
}
},
"timezone": "Europe/Brussels"
}
Original Message:
Sent: Mar 15, 2023 07:01 AM
From: Steve B
Subject: api command to activate existing maintenance schedule
There is a "create schedule" on this page: https://techdocs.broadcom.com/us/en/ca-enterprise-software/it-operations-management/ca-unified-infrastructure-management-probes/GA/probe-development-tools/restful-web-services/webservices-rest-apis/webservices-rest-call-reference/maintenance-calls.html
which gives me a slightly better idea of what each field is for, but even after filling in the appropriate info - i still get an error 500:
{ "account_id": "-1", "description": "API Test", "end_time": { "duration": { "hours": 2, "minutes": 0, "seconds": 0 }, "end_date_time": { "day": 0, "month": 0, "timestamp": { "hours": 0, "minutes": 0, "seconds": 0 }, "year": 0 }, "type": "duration" }, "name": "API Test", "recurrence_day_of_the_month": "15", "recurrence_days_of_the_week": "", "recurrence_end_date_time": { "day": 0, "month": 0, "timestamp": { "hours": 0, "minutes": 0, "seconds": 0 }, "year": 0 }, "recurrence_instance": "", "recurrence_pattern": "3", "recurrence_period": "Monthly", "start_date_time": { "day": 16, "month": 3, "timestamp": { "hours": 2, "minutes": 0, "seconds": 0 }, "year": 2023 }, "timezone": "Australia/Melbourne"}
Not sure what I'm doing wrong?
Original Message:
Sent: Mar 15, 2023 06:49 AM
From: Steve B
Subject: api command to activate existing maintenance schedule
Hi Marco,
Any chance there's some documentation regarding creating a new maintenance window via the API?
I'm looking at this one in particular: POST /uimapi/maintenance_mode/{domain}/{hub}/{robot}/add_schedule
There's an example post body in swagger, but there's not much to describe which fields are necessary, which ones aren't and what the options for each are:
{ "account_id": "string", "description": "string", "end_time": { "duration": { "hours": 0, "minutes": 0, "seconds": 0 }, "end_date_time": { "day": 0, "month": 0, "timestamp": { "hours": 0, "minutes": 0, "seconds": 0 }, "year": 0 }, "type": "string" }, "name": "string", "recurrence_day_of_the_month": "string", "recurrence_days_of_the_week": "string", "recurrence_end_date_time": { "day": 0, "month": 0, "timestamp": { "hours": 0, "minutes": 0, "seconds": 0 }, "year": 0 }, "recurrence_instance": "string", "recurrence_pattern": "string", "recurrence_period": "string", "start_date_time": { "day": 0, "month": 0, "timestamp": { "hours": 0, "minutes": 0, "seconds": 0 }, "year": 0 }, "timezone": "string"}
The only detail swagger provides is:
Recurrence pattern can be one of: daily, weekly, monthly
Recurrence days of the week can be a comma-separated list of: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday
Any guidance or assistance would be greatly appreciated.
Cheers
Original Message:
Sent: Mar 01, 2023 08:17 AM
From: Marco Ippati
Subject: api command to activate existing maintenance schedule
hi Steve,
UIM provides uimapi: uimapi Call Reference (broadcom.com)
You can control maintenance using one of the maintenance calls. via the built in Swagger or via command.
There is a call to: "Update a maintenance schedule in the UIM system with a new active window duration"

Thanks,
Marco,
------------------------------
Marco Ippati
Senior Technical Support Engineer
Broadcom Software | Agile Operation Division
Barcelona, Spain | marco.ippati@broadcom.com
Original Message:
Sent: Feb 28, 2023 05:27 PM
From: Steve B
Subject: api command to activate existing maintenance schedule
Hi guys,
Just wondering if anyone has a recommended way of activating an existing maintenance schedule remotely via one of the apis?
We've been using schedules (every 4th friday for example) but after some time, they stop working until someone goes through each of them and changes the start date to something more recent. we have an open ticket for this - well, this is the 3rd ticket we've had for the same fault but i digress.
My idea is to have a handful of maintenance windows in OC, and have MECM activate said maintenance window prior to the patching outage.
Something logically like "activate maintenance ID 708 for x hours"
Any recommendations would be greatly appreciated!
Cheers