POST
/
enrichments
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":[{"fieldName":"sourceIPs","enrichmentType":{"geoIp":{"withAsn":true},"suspiciousIp":{},"aws":{"resourceType":"ec2"},"customEnrichment":{"id":1}},"enrichedFieldName":"string","selectedColumns":["string"]}]}'
};

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

Authorizations

Authorization
string
header
required

API key authentication

Body

application/json

This response data structure represents a collection of enrichments

Response

200
application/json

A successful response.

Response data structure for enrichments creation