Add Website Groups

Last updated on 20 January, 2020

With LogicMonitor’s REST API you can programmatically add a new website group to your LogicMonitor account.

Add a website group

Add a new website group

HTTP Method:POST

URI: /service/groups

Request Parameters:

Property

Description

Required?

Values

Type

name The name of the group Yes String
description The description for the group No This value defaults to a blank String String
stopMonitoring If this value is true then monitoring is be disabled for the websites in this group. Note that if monitoring is disabled, alerting will also be disabled. No true | false. This value defaults to false. Boolean
disableAlerting If this value is true then alerting is disabled for the websites in this group. Note that if monitoring is disabled, alerting will also be disabled. No true | false. This value defaults to false. Boolean
parentId The Id of the parent group. If parentId=1 then the group exists under the root group. No Defaults to 1 Integer
serviceProperties The properties set for the group (does not include inherited properties) No “serviceProperties” : [ {“name” : “PropertyName1″,”value” : “PropertyValue1”},{“name” : “PropertyName2″,”value” : “PropertyValue2”} ] JSON Object

 

Example 1: Add a new website group

The following request adds a new website group to the api.logicmonitor.com account.

Request

curl --user 'apiUser:example' -H "Content-Type: application/json" -d '{"name":"newServiceGroup","description":"serviceGroupDescription","parentId":15}' -X POST "https://api.logicmonitor.com/santaba/rest/service/groups/"

Response

{
  "status" : 200,
  "errmsg" : "OK",
  "data" : {
    "id" : 16,
    "name" : "newServiceGroup",
    "description" : "serviceGroupDescription",
    "disableAlerting" : false,
    "stopMonitoring" : false,
    "parentId" : 15,
    "alertStatus" : "none",
    "sdtStatus" : "none-none-none",
    "alertDisableStatus" : "none-none-none",
    "hasServicesDisabled" : false,
    "numOfServices" : 0,
    "userPermission" : "write",
    "serviceProperties" : [ ],
    "numOfDirectServices" : 0,
    "testLocation" : "{\"all\":true}",
    "fullPath" : "QA/Tests/newServiceGroup",
    "subGroups" : [ ]
  }
In This Article