Replace Transforms Handler
curl --request PUT \
--url https://api.allium.so/api/v1/beam/{config_id}/transforms \
--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"
payload = [
{
"script": "<string>",
"uid": "<string>",
"type": "v8"
}
]
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
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', 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",
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([
[
'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"
payload := strings.NewReader("[\n {\n \"script\": \"<string>\",\n \"uid\": \"<string>\",\n \"type\": \"v8\"\n }\n]")
req, _ := http.NewRequest("PUT", 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.put("https://api.allium.so/api/v1/beam/{config_id}/transforms")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("[\n {\n \"script\": \"<string>\",\n \"uid\": \"<string>\",\n \"type\": \"v8\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.allium.so/api/v1/beam/{config_id}/transforms")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"script\": \"<string>\",\n \"uid\": \"<string>\",\n \"type\": \"v8\"\n }\n]"
response = http.request(request)
puts response.read_body[
{
"script": "<string>",
"uid": "<string>",
"type": "v8"
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Transforms
Replace all transforms
Replaces the entire transforms list and redeploys the pipeline.
PUT
/
api
/
v1
/
beam
/
{config_id}
/
transforms
Replace Transforms Handler
curl --request PUT \
--url https://api.allium.so/api/v1/beam/{config_id}/transforms \
--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"
payload = [
{
"script": "<string>",
"uid": "<string>",
"type": "v8"
}
]
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
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', 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",
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([
[
'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"
payload := strings.NewReader("[\n {\n \"script\": \"<string>\",\n \"uid\": \"<string>\",\n \"type\": \"v8\"\n }\n]")
req, _ := http.NewRequest("PUT", 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.put("https://api.allium.so/api/v1/beam/{config_id}/transforms")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("[\n {\n \"script\": \"<string>\",\n \"uid\": \"<string>\",\n \"type\": \"v8\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.allium.so/api/v1/beam/{config_id}/transforms")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"script\": \"<string>\",\n \"uid\": \"<string>\",\n \"type\": \"v8\"\n }\n]"
response = http.request(request)
puts response.read_body[
{
"script": "<string>",
"uid": "<string>",
"type": "v8"
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Replaces the entire transforms list. Handles add, remove, update, and reorder in a single call. The pipeline is automatically redeployed.
Path parameters:
Request body:
Response: Array of updated
Required permission:
edit — owners and editors.| Parameter | Description |
|---|---|
config_id | Pipeline configuration ID |
BeamTransformerConfig[]
curl -X PUT https://api.allium.so/api/v1/beam/${CONFIG_ID}/transforms \
-H "X-API-Key: ${ALLIUM_API_KEY}" \
-H "Content-Type: application/json" \
-d '[
{ "type": "redis_set_filter", "filter_expr": "root = this.from_address" },
{ "type": "v8", "script": "function transform(d) { return d; }" }
]'
BeamTransformerConfig objects.
The transforms list cannot be empty.
Omit the
uid field on new transforms — one will be auto-generated. Include the uid for existing transforms you want to keep or update.Authorizations
Path Parameters
Body
application/json
Was this page helpful?
⌘I