Monitor groups

List monitor groups

List monitor groups

GEThttp://127.0.0.1:8888/api/monitor_groups
Query parameters
Response

OK

Body
countinteger (int64)

Total number of resource.

Example: 100
itemsarray of object
Request
const response = await fetch('http://127.0.0.1:8888/api/monitor_groups', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "count": 100,
  "items": [
    {
      "id": {},
      "name": "text",
      "enabled": false,
      "description": "text"
    }
  ]
}

Create a monitor group

Create a new monitor group.

POSThttp://127.0.0.1:8888/api/monitor_groups
Body
namestring

Name of monitor group

enabledboolean

Enable monitor group or not.

descriptionstring

Description for monitor group

Response

Created monitor group

Body
idall of

The unique ID of monitor group.

Request
const response = await fetch('http://127.0.0.1:8888/api/monitor_groups', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
{
  "id": {}
}

Retrieve a monitor group

Retrieves details of a monitor group.

GEThttp://127.0.0.1:8888/api/monitor_groups/{id}
Path parameters
id*all of

The unique ID of monitor group.

Response

OK

Body
idall of

The unique ID of monitor group.

namestring

Name of monitor group

enabledboolean

Enable monitor group or not.

descriptionstring

Description for monitor group

Request
const response = await fetch('http://127.0.0.1:8888/api/monitor_groups/{id}', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "id": {},
  "name": "text",
  "enabled": false,
  "description": "text"
}

Update an monitor group.

Update an monitor group

POSThttp://127.0.0.1:8888/api/monitor_groups/{id}
Path parameters
id*all of

The unique ID of monitor group.

Body
namestring

Name of monitor group

enabledboolean

Enable monitor group or not.

descriptionstring

Description for monitor group

Response

OK

Request
const response = await fetch('http://127.0.0.1:8888/api/monitor_groups/{id}', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({}),
});
const data = await response.json();