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!
With LogicMonitor’s REST API you can programmatically get the details for all SDTs scheduled for your LogicMonitor websites.
Note: As with all of our API calls, authentication is required.
HTTP Method:GET
URI: /service/services/{id}/sdts
Request Parameters: By default a list of 50 SDT properties will be returned for each result. You can include sort, filter, fields, size and offset parameters in your request to control what data is included in the response and how it is formatted.
The following request returns all scheduled SDTs for the website with an id of 32. .
Request:
curl --user 'apiUser:example' -X GET "https://api.logicmonitor.com/santaba/rest/service/services/32/sdts"
Response:
{ "status" : 200, "errmsg" : "OK", "data" : { "total" : 1, "items" : [ { "id" : "S_60", "sdtType" : 1, "admin" : "sarah", "comment" : "", "weekDay" : 1, "monthDay" : 0, "hour" : 0, "minute" : 0, "endHour" : 0, "endMinute" : 0, "duration" : 60, "startDateTimeOnLocal" : "2015-07-02 14:28:00 PDT", "startDateTime" : 1435872480000, "endDateTimeOnLocal" : "2015-07-02 15:28:00 PDT", "endDateTime" : 1435876080000, "isEffective" : true, "type" : "ServiceSDT", "serviceId" : 32, "serviceName" : "pingService" } ] }
The following request returns the duration, comment, isEffective, sdtType, and id properties for each scheduled SDT for the website with an id of 32.
curl --user 'apiUser:example' -X GET "https://api.logicmonitor.com/santaba/rest/service/services/32/sdts?fields=duration,comment,isEffective,sdtType,id"
{ "status" : 200, "errmsg" : "OK", "data" : { "total" : 1, "items" : [ { "id" : "S_60", "sdtType" : 1, "comment" : "", "duration" : 60, "isEffective" : true } ] }
In This Article