PUT
/
v1
/
scopes
const fetch = require('node-fetch');

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

let options = {
  method: 'PUT',
  headers: {Authorization: 'Bearer <API_KEY>', 'content-type': 'application/json'},
  body: '{"id":"scope_id","displayName":"scope_name","description":"scope_description","filters":[{"entityType":"ENTITY_TYPE_UNSPECIFIED","expression":"expression"}],"defaultExpression":"expression"}'
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error('error:' + err));
{
  "scope": {
    "id": "scope_id",
    "displayName": "scope_name",
    "description": "scope_description",
    "teamId": 1234,
    "filters": [
      {
        "entityType": "ENTITY_TYPE_UNSPECIFIED",
        "expression": "expression"
      }
    ],
    "defaultExpression": "expression"
  }
}

Authorizations

Authorization
string
header
required

API key authentication

Body

application/json

This data structure represents a request to update a scope

Response

200
application/json

A successful response.

This data structure represents a response to update a scope