Update Custom Enrichment
curl --request PUT \
--url https://api.coralogix.com/mgmt/openapi/5/enrichment-rules/custom-enrichment-rules/v1 \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"customEnrichmentId": 1,
"description": "custom_enrichment_description",
"file": {
"textual": "row1,row2 value1,value2",
"binary": "0xFABB32",
"extension": "csv",
"name": "file_name",
"size": 100
},
"name": "custom_enrichment_name"
}
'import requests
url = "https://api.coralogix.com/mgmt/openapi/5/enrichment-rules/custom-enrichment-rules/v1"
payload = {
"customEnrichmentId": 1,
"description": "custom_enrichment_description",
"file": {
"textual": "row1,row2 value1,value2",
"binary": "0xFABB32",
"extension": "csv",
"name": "file_name",
"size": 100
},
"name": "custom_enrichment_name"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
customEnrichmentId: 1,
description: 'custom_enrichment_description',
file: {
textual: 'row1,row2 value1,value2',
binary: '0xFABB32',
extension: 'csv',
name: 'file_name',
size: 100
},
name: 'custom_enrichment_name'
})
};
fetch('https://api.coralogix.com/mgmt/openapi/5/enrichment-rules/custom-enrichment-rules/v1', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.coralogix.com/mgmt/openapi/5/enrichment-rules/custom-enrichment-rules/v1",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'customEnrichmentId' => 1,
'description' => 'custom_enrichment_description',
'file' => [
'textual' => 'row1,row2 value1,value2',
'binary' => '0xFABB32',
'extension' => 'csv',
'name' => 'file_name',
'size' => 100
],
'name' => 'custom_enrichment_name'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.coralogix.com/mgmt/openapi/5/enrichment-rules/custom-enrichment-rules/v1"
payload := strings.NewReader("{\n \"customEnrichmentId\": 1,\n \"description\": \"custom_enrichment_description\",\n \"file\": {\n \"textual\": \"row1,row2 value1,value2\",\n \"binary\": \"0xFABB32\",\n \"extension\": \"csv\",\n \"name\": \"file_name\",\n \"size\": 100\n },\n \"name\": \"custom_enrichment_name\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.coralogix.com/mgmt/openapi/5/enrichment-rules/custom-enrichment-rules/v1")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"customEnrichmentId\": 1,\n \"description\": \"custom_enrichment_description\",\n \"file\": {\n \"textual\": \"row1,row2 value1,value2\",\n \"binary\": \"0xFABB32\",\n \"extension\": \"csv\",\n \"name\": \"file_name\",\n \"size\": 100\n },\n \"name\": \"custom_enrichment_name\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coralogix.com/mgmt/openapi/5/enrichment-rules/custom-enrichment-rules/v1")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customEnrichmentId\": 1,\n \"description\": \"custom_enrichment_description\",\n \"file\": {\n \"textual\": \"row1,row2 value1,value2\",\n \"binary\": \"0xFABB32\",\n \"extension\": \"csv\",\n \"name\": \"file_name\",\n \"size\": 100\n },\n \"name\": \"custom_enrichment_name\"\n}"
response = http.request(request)
puts response.read_body{
"customEnrichment": {
"description": "<string>",
"fileName": "<string>",
"fileSize": 1,
"id": 1,
"isQueryOnly": true,
"name": "<string>",
"version": 1
},
"message": "Custom enrichment updated successfully"
}Custom Enrichments Service
Update Custom Enrichment
Updates a custom enrichment rule.
Update Custom Enrichment
curl --request PUT \
--url https://api.coralogix.com/mgmt/openapi/5/enrichment-rules/custom-enrichment-rules/v1 \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"customEnrichmentId": 1,
"description": "custom_enrichment_description",
"file": {
"textual": "row1,row2 value1,value2",
"binary": "0xFABB32",
"extension": "csv",
"name": "file_name",
"size": 100
},
"name": "custom_enrichment_name"
}
'import requests
url = "https://api.coralogix.com/mgmt/openapi/5/enrichment-rules/custom-enrichment-rules/v1"
payload = {
"customEnrichmentId": 1,
"description": "custom_enrichment_description",
"file": {
"textual": "row1,row2 value1,value2",
"binary": "0xFABB32",
"extension": "csv",
"name": "file_name",
"size": 100
},
"name": "custom_enrichment_name"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
customEnrichmentId: 1,
description: 'custom_enrichment_description',
file: {
textual: 'row1,row2 value1,value2',
binary: '0xFABB32',
extension: 'csv',
name: 'file_name',
size: 100
},
name: 'custom_enrichment_name'
})
};
fetch('https://api.coralogix.com/mgmt/openapi/5/enrichment-rules/custom-enrichment-rules/v1', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.coralogix.com/mgmt/openapi/5/enrichment-rules/custom-enrichment-rules/v1",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'customEnrichmentId' => 1,
'description' => 'custom_enrichment_description',
'file' => [
'textual' => 'row1,row2 value1,value2',
'binary' => '0xFABB32',
'extension' => 'csv',
'name' => 'file_name',
'size' => 100
],
'name' => 'custom_enrichment_name'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.coralogix.com/mgmt/openapi/5/enrichment-rules/custom-enrichment-rules/v1"
payload := strings.NewReader("{\n \"customEnrichmentId\": 1,\n \"description\": \"custom_enrichment_description\",\n \"file\": {\n \"textual\": \"row1,row2 value1,value2\",\n \"binary\": \"0xFABB32\",\n \"extension\": \"csv\",\n \"name\": \"file_name\",\n \"size\": 100\n },\n \"name\": \"custom_enrichment_name\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.coralogix.com/mgmt/openapi/5/enrichment-rules/custom-enrichment-rules/v1")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"customEnrichmentId\": 1,\n \"description\": \"custom_enrichment_description\",\n \"file\": {\n \"textual\": \"row1,row2 value1,value2\",\n \"binary\": \"0xFABB32\",\n \"extension\": \"csv\",\n \"name\": \"file_name\",\n \"size\": 100\n },\n \"name\": \"custom_enrichment_name\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coralogix.com/mgmt/openapi/5/enrichment-rules/custom-enrichment-rules/v1")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customEnrichmentId\": 1,\n \"description\": \"custom_enrichment_description\",\n \"file\": {\n \"textual\": \"row1,row2 value1,value2\",\n \"binary\": \"0xFABB32\",\n \"extension\": \"csv\",\n \"name\": \"file_name\",\n \"size\": 100\n },\n \"name\": \"custom_enrichment_name\"\n}"
response = http.request(request)
puts response.read_body{
"customEnrichment": {
"description": "<string>",
"fileName": "<string>",
"fileSize": 1,
"id": 1,
"isQueryOnly": true,
"name": "<string>",
"version": 1
},
"message": "Custom enrichment updated successfully"
}Authorizations
API key authentication
Body
application/json
This request data structure is used to update a custom enrichment
The custom enrichment id.
Required range:
x >= 0Example:
1
New human-readable description of the custom enrichment.
Example:
"custom_enrichment_description"
This data structure represents a file
- File
- File
- File
Show child attributes
Show child attributes
New human-readable name for the custom enrichment.
Example:
"custom_enrichment_name"
Was this page helpful?
⌘I