RPC API Developer's Guide

Delete SDTs

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:

  • Devices
  • Device Groups
  • Device Datasources
  • Device Datasource Instances
  • Device Datasource Instance Groups
  • Collectors

You can use deleteSDTs to delete an SDT for one of the above entities.

Note: As with all of our API calls, authentication is required.

 

deleteSDTs

URL:
https://accountName.logicmonitor.com/santaba/rpc/deleteSDTs?c=accountName&u=user&p=password&type=entityType&[hostId|hostGroupId|hostDataSourceId|dataSourceInstanceId|dataSourceInstanceGroupId|agentId]=entityId

 

Request Parameters: You can include the following as query parameters in a deleteSDTs request:

Parameter

Type

Description

type String Required. Specifies what entity's SDTs are being deleted.
Valid type values include host, group (hostGroup), instance, datasource, instancegroup, agent, and service
hostGroupId Integer Required when type=group. Deletes all SDT for a specific host group.
To get a hostGroupId in the UI: navigate to the group & the id is in the URL. In the new UI it is displayed in the URL as dg/##.

hostId Integer Required when type=host. Deletes all SDT for a specific host. To get a hostId in the UI: navigate to the group & the id is in the URL. In the new UI it is displayed in the URL as d/##.
hostDataSourceId Integer
Required when type=datasource. Deletes all SDT for all instances of a datasource on one host.
dataSourceInstanceId Integer
Required when type=instance. Deletes all SDT for an instance. The dataSourceInstance Id can be retrieved with getDataSourceInstances() (see information below this table).
dataSourceInstanceGroupID Integer
Required when type=instancegroup. Deletes all SDT for an instance group. This value can be retrieved with getDataSourceInstanceGroup() (see information below this table.)
agentId Integer Required when type=agent. Deletes all SDTs for a specific collector. Collector Ids can be found in your account UI (Settings | Collectors).

 

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], [errmsg] }, where status is the status of the response and errmsg is the error message associated with the response.

 

Example

Request:
curl "https://company.logicmonitor.com/santaba/rpc/deleteSDTs?type=host&hostId=237" 
Response:
{
  "status": 200,
  "errmsg": "OK"
}