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

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

let options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <API_KEY>', 'content-type': 'application/json'},
  body: '{"name":"custom_enrichment_name","description":"custom_enrichment_description","file":{"name":"file_name","extension":"csv","size":100,"textual":"row1,row2 value1,value2","binary":"0xFABB32"}}'
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error('error:' + err));
{
  "message": "Custom enrichment created successfully",
  "customEnrichment": {
    "id": 123,
    "name": "<string>",
    "description": "<string>",
    "version": 123,
    "isQueryOnly": true,
    "fileName": "<string>",
    "fileSize": 123
  }
}

Authorizations

Authorization
string
header
required

API key authentication

Body

application/json

This request data structure is used to create a custom enrichment

name
string
required
Example:

"custom_enrichment_name"

description
string
required
Example:

"custom_enrichment_description"

file
object
required

This data structure represents a file

Response

A successful response.

This response data structure is obtained when a custom enrichment is created

customEnrichment
object
required
message
string
Example:

"Custom enrichment created successfully"

I