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

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

let options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <API_KEY>', 'content-type': 'application/json'},
  body: '{"enrichmentFields":[{"enrichedFieldName":"string","fieldName":"string","selectedColumns":["string"]}],"enrichmentType":{"geoIp":{"withAsn":true}},"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
enrichmentFields
object[]
enrichmentType
object
  • Option 1
  • Option 2
  • Option 3
  • Option 4
requestEnrichments
Enrichment Prototype · object[]

Response

200 - application/json
enrichments
Enrichment · object[]
I