Create UDF version
Disclaimer: This beta endpoint is evolving; the API contract may change.
Consumes a source archive, assigns a version, and starts the UDF build. Optional configuration fields omitted from the request use the defaults documented in the request schema; values are not inherited from the previous version. Retry by requesting a new upload URL and re-uploading.
POST
/
v1
/
organizations
/
{organizationId}
/
udfs
/
{functionName}
/
versions
Create UDF version
curl --request POST \
--url https://api.clickhouse.cloud/v1/organizations/{organizationId}/udfs/{functionName}/versions \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"uploadId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"arguments": [
{
"name": "<string>",
"type": "<string>"
}
],
"returnType": "<string>",
"type": "<string>",
"returnName": "<string>",
"commandReadTimeout": 10000,
"commandWriteTimeout": 10000,
"sendChunkHeader": false,
"format": "TabSeparated",
"sandboxType": "basic",
"sandboxVersion": "v2",
"poolSize": null,
"maxCommandExecutionTime": 10
}
'import requests
url = "https://api.clickhouse.cloud/v1/organizations/{organizationId}/udfs/{functionName}/versions"
payload = {
"uploadId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"arguments": [
{
"name": "<string>",
"type": "<string>"
}
],
"returnType": "<string>",
"type": "<string>",
"returnName": "<string>",
"commandReadTimeout": 10000,
"commandWriteTimeout": 10000,
"sendChunkHeader": False,
"format": "TabSeparated",
"sandboxType": "basic",
"sandboxVersion": "v2",
"poolSize": None,
"maxCommandExecutionTime": 10
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
uploadId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
arguments: [{name: '<string>', type: '<string>'}],
returnType: '<string>',
type: '<string>',
returnName: '<string>',
commandReadTimeout: 10000,
commandWriteTimeout: 10000,
sendChunkHeader: false,
format: 'TabSeparated',
sandboxType: 'basic',
sandboxVersion: 'v2',
poolSize: null,
maxCommandExecutionTime: 10
})
};
fetch('https://api.clickhouse.cloud/v1/organizations/{organizationId}/udfs/{functionName}/versions', 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.clickhouse.cloud/v1/organizations/{organizationId}/udfs/{functionName}/versions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'uploadId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'arguments' => [
[
'name' => '<string>',
'type' => '<string>'
]
],
'returnType' => '<string>',
'type' => '<string>',
'returnName' => '<string>',
'commandReadTimeout' => 10000,
'commandWriteTimeout' => 10000,
'sendChunkHeader' => false,
'format' => 'TabSeparated',
'sandboxType' => 'basic',
'sandboxVersion' => 'v2',
'poolSize' => null,
'maxCommandExecutionTime' => 10
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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.clickhouse.cloud/v1/organizations/{organizationId}/udfs/{functionName}/versions"
payload := strings.NewReader("{\n \"uploadId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"arguments\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\"\n }\n ],\n \"returnType\": \"<string>\",\n \"type\": \"<string>\",\n \"returnName\": \"<string>\",\n \"commandReadTimeout\": 10000,\n \"commandWriteTimeout\": 10000,\n \"sendChunkHeader\": false,\n \"format\": \"TabSeparated\",\n \"sandboxType\": \"basic\",\n \"sandboxVersion\": \"v2\",\n \"poolSize\": null,\n \"maxCommandExecutionTime\": 10\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.post("https://api.clickhouse.cloud/v1/organizations/{organizationId}/udfs/{functionName}/versions")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"uploadId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"arguments\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\"\n }\n ],\n \"returnType\": \"<string>\",\n \"type\": \"<string>\",\n \"returnName\": \"<string>\",\n \"commandReadTimeout\": 10000,\n \"commandWriteTimeout\": 10000,\n \"sendChunkHeader\": false,\n \"format\": \"TabSeparated\",\n \"sandboxType\": \"basic\",\n \"sandboxVersion\": \"v2\",\n \"poolSize\": null,\n \"maxCommandExecutionTime\": 10\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.clickhouse.cloud/v1/organizations/{organizationId}/udfs/{functionName}/versions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"uploadId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"arguments\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\"\n }\n ],\n \"returnType\": \"<string>\",\n \"type\": \"<string>\",\n \"returnName\": \"<string>\",\n \"commandReadTimeout\": 10000,\n \"commandWriteTimeout\": 10000,\n \"sendChunkHeader\": false,\n \"format\": \"TabSeparated\",\n \"sandboxType\": \"basic\",\n \"sandboxVersion\": \"v2\",\n \"poolSize\": null,\n \"maxCommandExecutionTime\": 10\n}"
response = http.request(request)
puts response.read_body{
"status": 201,
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"result": {
"functionName": "<string>",
"version": 1,
"arguments": [
{
"name": "<string>",
"type": "<string>"
}
],
"returnType": "<string>",
"returnName": "<string>",
"poolSize": 1,
"commandReadTimeout": 123,
"commandWriteTimeout": 123,
"maxCommandExecutionTime": 1,
"sendChunkHeader": true,
"format": "<string>",
"error": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>",
"status": 400,
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"issues": [
{
"path": [
"<string>"
],
"code": "<string>",
"message": "<string>"
}
]
}{
"error": "<string>",
"status": 403,
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": "<string>",
"status": 404,
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": "<string>",
"status": 409,
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": "<string>",
"status": 410,
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": "<string>",
"status": 500,
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}Beta
Disclaimer: This beta endpoint is evolving; the API contract may change.
Consumes a source archive, assigns a version, and starts the UDF build. Optional configuration fields omitted from the request use the defaults documented in the request schema; values are not inherited from the previous version. Retry by requesting a new upload URL and re-uploading.
Consumes a source archive, assigns a version, and starts the UDF build. Optional configuration fields omitted from the request use the defaults documented in the request schema; values are not inherited from the previous version. Retry by requesting a new upload URL and re-uploading.
Authorizations
Use key ID and key secret obtained in ClickHouse Cloud console: https://clickhouse.com/docs/cloud/manage/openapi
Path Parameters
ID of the requested organization.
Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$Name of the UDF.
Pattern:
^[A-Za-z][A-Za-z0-9_]*$Body
application/json
- Option 1
- Option 2
Identifier of the uploaded source archive.
Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$Available options:
python3.11, native Show child attributes
Show child attributes
Allowed value:
"executable"Pattern:
^[A-Za-z][A-Za-z0-9_]*$Available options:
basic, netenable Available options:
v1, v2, v3 Required range:
x > 0Response
UDF version created and building.
HTTP status code.
Example:
201
Unique id assigned to every request. UUIDv4
Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$Show child attributes
Show child attributes
Last modified on August 3, 2026
Was this page helpful?
⌘I
Create UDF version
curl --request POST \
--url https://api.clickhouse.cloud/v1/organizations/{organizationId}/udfs/{functionName}/versions \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"uploadId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"arguments": [
{
"name": "<string>",
"type": "<string>"
}
],
"returnType": "<string>",
"type": "<string>",
"returnName": "<string>",
"commandReadTimeout": 10000,
"commandWriteTimeout": 10000,
"sendChunkHeader": false,
"format": "TabSeparated",
"sandboxType": "basic",
"sandboxVersion": "v2",
"poolSize": null,
"maxCommandExecutionTime": 10
}
'import requests
url = "https://api.clickhouse.cloud/v1/organizations/{organizationId}/udfs/{functionName}/versions"
payload = {
"uploadId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"arguments": [
{
"name": "<string>",
"type": "<string>"
}
],
"returnType": "<string>",
"type": "<string>",
"returnName": "<string>",
"commandReadTimeout": 10000,
"commandWriteTimeout": 10000,
"sendChunkHeader": False,
"format": "TabSeparated",
"sandboxType": "basic",
"sandboxVersion": "v2",
"poolSize": None,
"maxCommandExecutionTime": 10
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
uploadId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
arguments: [{name: '<string>', type: '<string>'}],
returnType: '<string>',
type: '<string>',
returnName: '<string>',
commandReadTimeout: 10000,
commandWriteTimeout: 10000,
sendChunkHeader: false,
format: 'TabSeparated',
sandboxType: 'basic',
sandboxVersion: 'v2',
poolSize: null,
maxCommandExecutionTime: 10
})
};
fetch('https://api.clickhouse.cloud/v1/organizations/{organizationId}/udfs/{functionName}/versions', 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.clickhouse.cloud/v1/organizations/{organizationId}/udfs/{functionName}/versions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'uploadId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'arguments' => [
[
'name' => '<string>',
'type' => '<string>'
]
],
'returnType' => '<string>',
'type' => '<string>',
'returnName' => '<string>',
'commandReadTimeout' => 10000,
'commandWriteTimeout' => 10000,
'sendChunkHeader' => false,
'format' => 'TabSeparated',
'sandboxType' => 'basic',
'sandboxVersion' => 'v2',
'poolSize' => null,
'maxCommandExecutionTime' => 10
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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.clickhouse.cloud/v1/organizations/{organizationId}/udfs/{functionName}/versions"
payload := strings.NewReader("{\n \"uploadId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"arguments\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\"\n }\n ],\n \"returnType\": \"<string>\",\n \"type\": \"<string>\",\n \"returnName\": \"<string>\",\n \"commandReadTimeout\": 10000,\n \"commandWriteTimeout\": 10000,\n \"sendChunkHeader\": false,\n \"format\": \"TabSeparated\",\n \"sandboxType\": \"basic\",\n \"sandboxVersion\": \"v2\",\n \"poolSize\": null,\n \"maxCommandExecutionTime\": 10\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.post("https://api.clickhouse.cloud/v1/organizations/{organizationId}/udfs/{functionName}/versions")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"uploadId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"arguments\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\"\n }\n ],\n \"returnType\": \"<string>\",\n \"type\": \"<string>\",\n \"returnName\": \"<string>\",\n \"commandReadTimeout\": 10000,\n \"commandWriteTimeout\": 10000,\n \"sendChunkHeader\": false,\n \"format\": \"TabSeparated\",\n \"sandboxType\": \"basic\",\n \"sandboxVersion\": \"v2\",\n \"poolSize\": null,\n \"maxCommandExecutionTime\": 10\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.clickhouse.cloud/v1/organizations/{organizationId}/udfs/{functionName}/versions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"uploadId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"arguments\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\"\n }\n ],\n \"returnType\": \"<string>\",\n \"type\": \"<string>\",\n \"returnName\": \"<string>\",\n \"commandReadTimeout\": 10000,\n \"commandWriteTimeout\": 10000,\n \"sendChunkHeader\": false,\n \"format\": \"TabSeparated\",\n \"sandboxType\": \"basic\",\n \"sandboxVersion\": \"v2\",\n \"poolSize\": null,\n \"maxCommandExecutionTime\": 10\n}"
response = http.request(request)
puts response.read_body{
"status": 201,
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"result": {
"functionName": "<string>",
"version": 1,
"arguments": [
{
"name": "<string>",
"type": "<string>"
}
],
"returnType": "<string>",
"returnName": "<string>",
"poolSize": 1,
"commandReadTimeout": 123,
"commandWriteTimeout": 123,
"maxCommandExecutionTime": 1,
"sendChunkHeader": true,
"format": "<string>",
"error": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>",
"status": 400,
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"issues": [
{
"path": [
"<string>"
],
"code": "<string>",
"message": "<string>"
}
]
}{
"error": "<string>",
"status": 403,
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": "<string>",
"status": 404,
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": "<string>",
"status": 409,
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": "<string>",
"status": 410,
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": "<string>",
"status": 500,
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}