POST
/
v1
/
policies:toggle
const fetch = require('node-fetch');

let url = 'https://api.coralogix.com/mgmt/openapi/v1/policies:toggle';

let options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <API_KEY>', 'content-type': 'application/json'},
  body: '{"id":"id","enabled":true}'
};

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

Authorizations

Authorization
string
header
required

API key authentication

Body

application/json

This data structue is used to toggle a policy by its ID.

Response

200
application/json

A successful response.

This data structue is obtained when toggling a policy by its ID.