POST
/
v2
/
target
const fetch = require('node-fetch');

let url = 'https://api.coralogix.com/mgmt/openapi/v2/target';

let options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <API_KEY>', 'content-type': 'application/json'},
  body: '{"isActive":true,"s3":{"bucket":"bucket","region":"us-west-2"}}'
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error('error:' + err));
{
  "target": {
    "s3": {
      "bucket": "bucket",
      "region": "us-west-2"
    },
    "archiveSpec": {
      "archivingFormatId": "json_id",
      "isActive": true,
      "enableTags": true
    }
  }
}

Authorizations

Authorization
string
header
required

API key authentication

Body

application/json

This data structure is used to set a storage target for logs.

Response

200
application/json

A successful response.

This data structure is obtained after setting a storage target for logs.

POST
/
v2
/
target
const fetch = require('node-fetch');

let url = 'https://api.coralogix.com/mgmt/openapi/v2/target';

let options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <API_KEY>', 'content-type': 'application/json'},
  body: '{"isActive":true,"s3":{"bucket":"bucket","region":"us-west-2"}}'
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error('error:' + err));
{
  "target": {
    "s3": {
      "bucket": "bucket",
      "region": "us-west-2"
    },
    "archiveSpec": {
      "archivingFormatId": "json_id",
      "isActive": true,
      "enableTags": true
    }
  }
}

Authorizations

Authorization
string
header
required

API key authentication

Body

application/json

This data structure is used to set a storage target for logs.

Response

200
application/json

A successful response.

This data structure is obtained after setting a storage target for logs.