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: '{"description":"custom_enrichment_description","file":{"extension":"csv","name":"file_name","size":100,"textual":"row1,row2 value1,value2"},"name":"custom_enrichment_name"}'
};

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

Authorizations

Authorization
string
header
required

API key authentication

Body

application/json

This request data structure is used to create a custom enrichment

description
string
required
Example:

"custom_enrichment_description"

file
object
required

This data structure represents a file

  • File
  • File
name
string
required
Example:

"custom_enrichment_name"

Response

200 - application/json

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

customEnrichment
object
required
message
string
Example:

"Custom enrichment created successfully"

I