Skip to content

Custom Enrichment API

This tutorial demonstrates how to set up Custom Enrichment using the Coralogix API.

API endpoint

Select the API endpoint associated with your Coralogix domain.

Use the Alerts, Rules, and Tags API Key as the Bearer token. Navigate to Data Flow > API Keys to access an existing key or generate a new one.

Supported API calls

The following Custom Enrichments API calls are supported:

  • Create

  • Update

  • Delete

  • List

Create

Create a new Custom Enrichment. Copy the curl commands below and customize them for your environment before sending them to the API. Please remember to use the correct endpoint for your deployment.

Request:

curl --location --request POST 'https://api.<span class="domain-value"></span>/api/v1/external/custom-enrichments' \  
--header 'Authorization: Bearer xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ 
--form 'name="\"YOUR_ENRICHMENT_NAME\""' \ 
--form 'description="\"YOUR_ENRICHMENT_DESCRIPTION\""' \ 
--form 'file=@"PATH_TO_YOUR_ENRICHMENT.CSV_FILE"'

Note:

The PATH_TO_YOUR_ENRICHMENT.CSV_FILE as for example: "/Users/Test/CustomEnrichment.csv".

Response:

{
    "message": "accepted new enrichment request with id 14",
    "customEnrichmentId": 14
}

Status Codes: 202, 406, 502.

Update

Request:

curl --location --request PUT 'https://webapi.coralogix.com/api/v1/external/custom-enrichments/14' \  
--header 'Authorization: Bearer xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ 
--form 'name="\"YOUR_ENRICHMENT_NAME_V2\""' \ 
--form 'description="\"YOUR_ENRICHMENT_DESCRIPTION\""' \ 
--form 'file=@"PATH_TO_YOUR_ENRICHMENT.CSV_FILE"'

Notes:

  • Please take a look at the Update Custom Enrichment URL: https://webapi.coralogix.com/api/v1/external/custom-enrichments/<customEnrichmentID>
    The customEnrichmentID used in the Endpoint (14 in this example), is taken from the initial POST request when the Custom Enrichment to update was created.

  • The PATH_TO_YOUR_ENRICHMENT.CSV_FILE as for example: "/Users/Test/CustomEnrichment_V2.csv".

Response:

{
    "message": "accepted update to enrichment request with id 14",
    "customEnrichmentId": 14
}

Status Codes: 202, 502.

Delete

Request:

curl --location --request DELETE 'https://webapi.coralogix.com/api/v1/external/custom-enrichments/14' \ 
--header 'Authorization: Bearer xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \ --data-raw ''

Note:

  • Please take a look at the Delete Custom Enrichment URL: https://webapi.coralogix.com/api/v1/external/custom-enrichments/<customEnrichmentID>
    The customEnrichmentID used in the Endpoint (14 in this example), is taken from the initial POST request when the Custom Enrichment to delete  was created.

Response:

{
    "message": "deleted custom enrichment 14",
    "customEnrichmentId": 14
}

Status Codes: 200, 409, 502.

List

Request:

curl --location --request GET 'https://webapi.coralogix.com/api/v1/external/custom-enrichments/' \
--header 'Authorization: Bearer xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'

Response:

[    {        "id": 13,        "name": "Enrichment Test",        "description": "First Coralogix API Custom Enrichment Test",        "version": 1    },    {         "id": 14, "name": "customer's UUID to customer name V2",         "description": "This enrichment is for mapping UUID to name",         "version": 2     }]

Status Codes: 200, 500.

Additional resources

DocumentationCustom Enrichment

Support

Need help?

Our world-class customer success team is available 24/7 to walk you through your setup and answer any questions that may come up.

Feel free to reach out to us via our in-app chat or by emailing [email protected].