Skip to main content
node
const fetch = require('node-fetch');

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

let options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <API_KEY>', 'content-type': 'application/json'},
  body: '{"requestEnrichments":[{"enrichedFieldName":"string","enrichmentType":{"geoIp":{"withAsn":true}},"fieldName":"sourceIPs","selectedColumns":["string"]}]}'
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error('error:' + err));
{
  "enrichments": [
    {
      "enrichedFieldName": 1,
      "enrichmentType": {
        "geoIp": {
          "withAsn": true
        }
      },
      "fieldName": 1,
      "id": 1,
      "selectedColumns": [
        [
          "city",
          "population"
        ]
      ]
    }
  ]
}

Authorizations

Authorization
string
header
required

API key authentication

Body

application/json

This response data structure represents a collection of enrichments

requestEnrichments
Enrichment Prototype · object[]
required

Response

200 - application/json

Response data structure for enrichments creation

enrichments
Enrichment · object[]
required
I