Skip to main content
POST
Create UDF
Creates a new UDF. See User-defined functions in Cloud.

Permission

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

授权

Authorization
string
header
必填

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

路径参数

organizationId
string<uuid>
必填

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)$

请求体

application/json
uploadId
string<uuid>
必填

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>
必填
可用选项:
python3.11,
native
arguments
object[]
必填
returnType
string
必填
type
string
必填
Allowed value: "executable"
functionName
string
必填
Pattern: ^[A-Za-z][A-Za-z0-9_]*$
returnName
string | null
Pattern: ^[A-Za-z][A-Za-z0-9_]*$
commandReadTimeout
integer
默认值:10000
commandWriteTimeout
integer
默认值:10000
memoryLimitMib
integer | null
必填范围: 1 <= x <= 1048576
sendChunkHeader
boolean
默认值:false
deterministic
boolean
默认值: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
默认值:TabSeparated
sandboxType
enum<string>
默认值:basic
可用选项:
basic,
netenable
sandboxVersion
enum<string>
默认值:v2
可用选项:
v1,
v2,
v3
poolSize
null

Always null — an executable UDF has no command pool.

maxCommandExecutionTime
integer | null
默认值:10
必填范围: x > 0

响应

UDF created and building.

status
integer
必填

HTTP status code.

示例:

201

requestId
string<uuid>
必填

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
必填
最后修改于 2026年10月3日