POST
/
api
/
v1
/
rulegroup-mapping
const fetch = require('node-fetch');

let url = 'https://api.coralogix.com/mgmt/openapi/api/v1/rulegroup-mapping';

let options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <API_KEY>', 'content-type': 'application/json'},
  body: '{"name":"string","description":"string","enabled":true,"hidden":true,"creator":"string","ruleMatchers":[{"applicationName":{"value":"string"},"subsystemName":{"value":"string"},"severity":{"value":"VALUE_DEBUG_OR_UNSPECIFIED"}}],"ruleSubgroups":[{"rules":[{"name":"string","description":"string","sourceField":"string","parameters":{"extractParameters":{"rule":"string"},"jsonExtractParameters":{"destinationFieldType":"DESTINATION_FIELD_CATEGORY_OR_UNSPECIFIED","rule":"string","destinationFieldText":"string"},"replaceParameters":{"destinationField":"string","replaceNewVal":"string","rule":"string"},"parseParameters":{"destinationField":"string","rule":"string"},"allowParameters":{"keepBlockedLogs":true,"rule":"string"},"blockParameters":{"keepBlockedLogs":true,"rule":"string"},"extractTimestampParameters":{"standard":"FORMAT_STANDARD_STRFTIME_OR_UNSPECIFIED","format":"string"},"removeFieldsParameters":{"fields":["string"]},"jsonStringifyParameters":{"destinationField":"string","deleteSource":true},"jsonParseParameters":{"destinationField":"string","deleteSource":true,"escapedValue":true,"overrideDest":true}},"enabled":true,"order":0}],"enabled":true,"order":0}],"order":0}'
};

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

Authorizations

Authorization
string
header
required

API key authentication

Body

application/json

Response

200
application/json

A successful response.

The response is of type object.