Update Transform Handler
curl --request PATCH \
--url https://api.allium.so/api/v1/beam/{config_id}/transforms/{transform_uid} \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"script": "<string>",
"uid": "<string>",
"type": "v8"
}
'import requests
url = "https://api.allium.so/api/v1/beam/{config_id}/transforms/{transform_uid}"
payload = {
"script": "<string>",
"uid": "<string>",
"type": "v8"
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({script: '<string>', uid: '<string>', type: 'v8'})
};
fetch('https://api.allium.so/api/v1/beam/{config_id}/transforms/{transform_uid}', 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.allium.so/api/v1/beam/{config_id}/transforms/{transform_uid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'script' => '<string>',
'uid' => '<string>',
'type' => 'v8'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$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.allium.so/api/v1/beam/{config_id}/transforms/{transform_uid}"
payload := strings.NewReader("{\n \"script\": \"<string>\",\n \"uid\": \"<string>\",\n \"type\": \"v8\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-KEY", "<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.patch("https://api.allium.so/api/v1/beam/{config_id}/transforms/{transform_uid}")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"script\": \"<string>\",\n \"uid\": \"<string>\",\n \"type\": \"v8\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.allium.so/api/v1/beam/{config_id}/transforms/{transform_uid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"script\": \"<string>\",\n \"uid\": \"<string>\",\n \"type\": \"v8\"\n}"
response = http.request(request)
puts response.read_body{
"script": "<string>",
"uid": "<string>",
"type": "v8"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Transforms
Update transform
Updates a single transform by UID and redeploys the pipeline.
PATCH
/
api
/
v1
/
beam
/
{config_id}
/
transforms
/
{transform_uid}
Update Transform Handler
curl --request PATCH \
--url https://api.allium.so/api/v1/beam/{config_id}/transforms/{transform_uid} \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"script": "<string>",
"uid": "<string>",
"type": "v8"
}
'import requests
url = "https://api.allium.so/api/v1/beam/{config_id}/transforms/{transform_uid}"
payload = {
"script": "<string>",
"uid": "<string>",
"type": "v8"
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({script: '<string>', uid: '<string>', type: 'v8'})
};
fetch('https://api.allium.so/api/v1/beam/{config_id}/transforms/{transform_uid}', 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.allium.so/api/v1/beam/{config_id}/transforms/{transform_uid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'script' => '<string>',
'uid' => '<string>',
'type' => 'v8'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$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.allium.so/api/v1/beam/{config_id}/transforms/{transform_uid}"
payload := strings.NewReader("{\n \"script\": \"<string>\",\n \"uid\": \"<string>\",\n \"type\": \"v8\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-KEY", "<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.patch("https://api.allium.so/api/v1/beam/{config_id}/transforms/{transform_uid}")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"script\": \"<string>\",\n \"uid\": \"<string>\",\n \"type\": \"v8\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.allium.so/api/v1/beam/{config_id}/transforms/{transform_uid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"script\": \"<string>\",\n \"uid\": \"<string>\",\n \"type\": \"v8\"\n}"
response = http.request(request)
puts response.read_body{
"script": "<string>",
"uid": "<string>",
"type": "v8"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Updates one transform by its UID. The pipeline is automatically redeployed after the update.
Path parameters:
Request body:
Response: The updated
Required permission:
edit — owners and editors.| Parameter | Description |
|---|---|
config_id | Pipeline configuration ID |
transform_uid | UID of the transform to update |
BeamTransformerConfig
- V8 JavaScript
- Redis set filter
curl -X PATCH https://api.allium.so/api/v1/beam/${CONFIG_ID}/transforms/${TRANSFORM_UID} \
-H "X-API-Key: ${ALLIUM_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"type": "v8",
"script": "function transform(record) { record.parsed = true; return record; }"
}'
curl -X PATCH https://api.allium.so/api/v1/beam/${CONFIG_ID}/transforms/${TRANSFORM_UID} \
-H "X-API-Key: ${ALLIUM_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"type": "redis_set_filter",
"filter_expr": "root = this.address"
}'
BeamTransformerConfig object.Authorizations
Body
application/json
Was this page helpful?
⌘I