Come join our live training webinar every other Wednesday at 11am PST and hear LogicMonitor experts explain best practices and answer common questions. We understand these are uncertain times, and we are here to help!
Note that LogicMonitor does have an available REST API equivalent for this API call.
Scheduled Down Time (SDT) allows you to suppress alert notifications for a specific time period: daily, weekly, or monthly. LogicMonitor’s RPC API allows you to programmatically manage SDTs for:
You can use setSDT to add an SDT for one of the above entities.
Note: As with all of our API calls, authentication is required.
https://accountName.logicmonitor.com/santaba/rpc/set{Entity}SDT?agentId=agentIdNum&id=0&type=typeNum1&year=startYear&month=startMonth&day=startDay&hour=startHour&minute=startMinute&endYear=endYear&endMonth=endMonth&endDay=endDay&endHour=endHour&endMinute=endMinute
where {Entity} must be:
Request Parameters: You can include the following as query parameters in your request:
getDataSourceInstances:
https://accountName.logicmonitor.com/santaba/rpc/getDataSourceInstances?hostId=hostIdNum&dataSource=dataSourceName
getDataSourceInstanceGroup:
https://accountName.logicmonitor.com/santaba/rpc/getDataSourceInstanceGroup?hostName=hostName&dataSourceName=dataSourceName&dataSourceInstanceGroupName=dataSourceInstanceGroupName
All outputs will be in the format: { [status], [data], [errmsg] }, where status is the status of the response, errmsg is the error message associated with the response and the data object includes the following:
Set a “Weekly” SDT for a specific device:
curl "https://company.logicmonitor.com/santaba/rpc/setHostSDT?hostId=237&type=2&weekDay=1&hour=1&minute=1&endHour=2&endMinute=2"
Response:
{ "status": 200, "data": { "startDateTime": { "minute": 2, "weekDay": 4, "month": 10, "year": 2014, "hour": 22, "day": 22 }, "weekDay": 1, "monthDay": 0, "endMinute": 2, "hostId": 237, "hour": 1, "type": "weekly", "endDateTime": { "minute": 2, "weekDay": 4, "month": 10, "year": 2014, "hour": 22, "day": 22 }, "endHour": 2, "id": 23, "minute": 1, "category": {"name": "HostSDT"}, "duration": 0, "sdtType": 2, "admin": "steve", "isEffective": false, "comment": "" }, "errmsg": "OK" }
In This Article