RPC API Developer's Guide

Delete a Device

Note that LogicMonitor does have an available REST API equivalent for this API call.

LogicMonitor's RPC API enables you to delete devices from your account programmatically with deleteHost.

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

 

deleteHost

URL:
https://accountName.logicmonitor.com/santaba/rpc/deleteHost?c=accountName&u=user&p=password&hostId=hostIdNum&deleteFromSystem=true|false&hostGroupId=hostGroupIdNum

 

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

Parameter

Type

Description

hostId Integer Required. The Unique Id of the Host

To get a hostId in the UI: navigate to the device & select the focus icon - the id is in the URL as d-##.

deleteFromSystem Boolean Optional. true | false (default)

true: The Host will be removed from your LogicMonitor account
false: The Host will be deleted from hostGroupId(s) specified in the request.

hostGroupId Integer Required if deleteFromSystem=false (or not specified). The unique Id of the Host group to remove the Host from.

To get a hostGroupId in the UI: navigate to the group & select the focus icon - the id is in the URL as dg-##.

 

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://apiAccount.logicmonitor.com/santaba/rpc/deleteHost?c=apiAccount&u=apiUser&p=example&hostId=208&deleteFromSystem=true" 
Response:
{
  "status": 200,
  "errmsg": "OK"
}