const fetch = require('node-fetch');

let url = 'https://api.coralogix.com/mgmt/openapi/v1/rule-group-sets';

let options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <API_KEY>', 'content-type': 'application/json'},
  body: '{"groups":[{"name":"string","interval":0,"limit":"string","rules":[{"record":"string","expr":"string","labels":{"property1":"string","property2":"string"}}],"version":0,"id":"string"}],"name":"string"}'
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error('error:' + err));
{
  "id": "<string>"
}

Authorizations

Authorization
string
header
required

API key authentication

Body

application/json

A set of rule groups to create.

Response

200
application/json

A successful response.

Result of creating a rule group set.