LogicMonitor seeks to disrupt AI landscape with $800M strategic investment at $2.4B valuation to revolutionize data centers.

Learn More

Get all SDTs for a Website

Last updated on 25 November, 2020

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.

Property

Syntax

Description

Example URI

sort sort={+ or -}property Sorts the response by the property specified in either increasing (+) or decreasing (-) order /service/services/23/sdts?sort=-sdtType
filter filter=property:value Filters the response to include only the results that have the specified value for the specified property /service/services/45/sdts?filter=serviceName:QAservice
fields fields={list of properties separated by commas} Filters the response to only include the following fields for each object /service/services/89/sdts?fields=serviceName,id,sdtType
size size=integer The number of results to display /service/services/67/sdts?size=5
offset offset=integer The number of results to offset the displayed results by /service/services/34/sdts?offset=2

Example 1: Get all SDTs for a particular website

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"
    } ]
  }

Example 2: Get all SDTs for a particular website

The following request returns the duration, comment, isEffective, sdtType, and id properties for each scheduled SDT 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?fields=duration,comment,isEffective,sdtType,id"

Response:

{
  "status" : 200,
  "errmsg" : "OK",
  "data" : {
    "total" : 1,
    "items" : [ {
      "id" : "S_60",
      "sdtType" : 1,
      "comment" : "",
      "duration" : 60,
      "isEffective" : true
    } ]
  }
In This Article