RPC API Developer's Guide

Delete a Device Group

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

Device groups are LogicMonitors way of visually and logically organizing your monitored infrastructure.  LogicMonitor's RPC API enables you to programmatically delete device groups with deleteHostGroup.

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

 

deleteHostGroup

URL:
https://accountName.logicmonitor.com/santaba/rpc/deleteHostGroup?hgId=178&deleteHosts=trueOrFalse

 

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

Parameter

Type

Description

hgId Integer Required. The Id of the host group to be deleted.
deleteHosts Boolean Optional. true | false (default) true: All hosts and sub-groups of this host group will be removed from the system. false: Hosts and sub-groups of this host group will not be removed from the system.

 

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/deleteHostGroup?c=apiAccount&u=apiUser&p=example&hgId=53" 
Response:
{
  "status": 200,
  "data": [],
  "errmsg": "OK"
}