POST
/
v1
/
retentions
const fetch = require('node-fetch');

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

let options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <API_KEY>', 'content-type': 'application/json'},
  body: '{"retentionUpdateElements":[{"id":"string","name":"string"}]}'
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error('error:' + err));
{
  "retentions": [
    {
      "id": "<string>",
      "order": 123,
      "name": "<string>",
      "editable": true
    }
  ]
}

Authorizations

Authorization
string
header
required

API key authentication

Body

application/json

This data structure is used to update retentions

Response

200
application/json

A successful response.

This data structure is obtained after updating retentions