Skip to main content
POST
Create UDF version
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.

Permission

The API key must have the control-plane:organization:manage-udfs permission.

Authorizations

Authorization
string
header
required

Use key ID and key secret obtained in ClickHouse Cloud console: https://clickhouse.com/docs/cloud/manage/openapi

Path Parameters

organizationId
string<uuid>
required

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)$
functionName
string
required

Name of the UDF.

Pattern: ^[A-Za-z][A-Za-z0-9_]*$

Body

application/json
uploadId
string<uuid>
required

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)$
runtime
enum<string>
required

Runtime used to execute the UDF command.

Available options:
python3.11,
native
arguments
object[]
required

Arguments passed to the UDF command.

returnType
string
required

ClickHouse data type of the returned value.

type
string
required

Executable UDF type.

Allowed value: "executable"
returnName
string | null

Name of the returned value, or null when unnamed.

Pattern: ^[A-Za-z][A-Za-z0-9_]*$
commandReadTimeout
integer
default:10000

Command stdout read timeout in milliseconds.

commandWriteTimeout
integer
default:10000

Command stdin write timeout in milliseconds.

memoryLimitMib
integer | null

Maximum memory, in MiB, available to each UDF sandbox process. Null uses the sandbox default.

Required range: 1 <= x <= 1048576
sendChunkHeader
boolean
default:false

Whether ClickHouse sends a row-count chunk header.

deterministic
boolean
default:false

Marks the UDF as deterministic so ClickHouse can reuse cached query results. Only set this when the UDF always returns the same result for the same arguments.

format
string
default:TabSeparated

Input and output format used by the UDF command.

sandboxType
enum<string>
default:basic

Sandbox isolation level.

Available options:
basic,
netenable
poolSize
null

Always null — an executable UDF has no command pool.

maxCommandExecutionTime
integer | null
default:10

Maximum command execution time in seconds.

Required range: x > 0

Response

UDF version created and building.

status
integer
required

HTTP status code.

Example:

201

requestId
string<uuid>
required

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)$
result
object
required