> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-detect-table-modification.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# List UDFs

> **Disclaimer:** This beta endpoint is evolving; the API contract may change. <br /><br /> Returns the latest version of each UDF in the organization.

<span data-endpoint-badge="Beta"><Badge color="blue">Beta</Badge></span>

**Disclaimer:** This beta endpoint is evolving; the API contract may change. <br /><br /> Returns the latest version of each UDF in the organization.


## OpenAPI

````yaml _specs/cloud-openapi.json GET /v1/organizations/{organizationId}/udfs
openapi: 3.1.2
info:
  title: OpenAPI spec for ClickHouse Cloud
  version: '1.0'
  contact:
    name: ClickHouse Support
    url: >-
      https://clickhouse.com/docs/en/cloud/manage/openapi?referrer=openapi-1037333
    email: support@clickhouse.com
servers:
  - url: https://api.clickhouse.cloud
security:
  - basicAuth: []
tags:
  - name: Organization
  - name: User management
  - name: Billing
  - name: Role Management
  - name: Service
  - name: Backup
  - name: OpenAPI
  - name: Prometheus
  - name: ClickPipes
  - name: ClickStack
  - name: Postgres
  - name: UDF
paths:
  /v1/organizations/{organizationId}/udfs:
    get:
      tags:
        - UDF
      summary: List UDFs
      description: >-
        **Disclaimer:** This beta endpoint is evolving; the API contract may
        change. <br /><br /> Returns the latest version of each UDF in the
        organization.
      operationId: udfList
      parameters:
        - in: path
          name: organizationId
          schema:
            description: ID of the requested organization.
            type: string
            format: uuid
            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)$
          required: true
          description: ID of the requested organization.
        - in: query
          name: cursor
          schema:
            description: Cursor returned in `pagination.nextCursor` from the previous page.
            type: string
          description: Cursor returned in `pagination.nextCursor` from the previous page.
        - in: query
          name: limit
          schema:
            description: >-
              Maximum number of records to return per page. Defaults to 100.
              Maximum is 100.
            default: 100
            type: integer
            exclusiveMinimum: 0
            maximum: 100
          description: >-
            Maximum number of records to return per page. Defaults to 100.
            Maximum is 100.
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    description: HTTP status code.
                    example: 200
                    type: integer
                  requestId:
                    description: Unique id assigned to every request. UUIDv4
                    type: string
                    format: uuid
                    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:
                    $ref: '#/components/schemas/UdfListResponse'
                required:
                  - status
                  - requestId
                  - result
                additionalProperties: false
        '400':
          description: >-
            The request cannot be processed due to a client error. Please verify
            your request parameters and try again.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    description: Error message.
                    type: string
                  issues:
                    description: Validation issues that caused the request to be rejected.
                    type: array
                    items:
                      type: object
                      properties:
                        path:
                          description: Path to the invalid field.
                          type: array
                          items:
                            anyOf:
                              - type: string
                              - type: number
                        code:
                          description: Validation issue code.
                          type: string
                        message:
                          description: Human-readable description of the issue.
                          type: string
                      required:
                        - path
                        - code
                        - message
                      additionalProperties: false
                  status:
                    description: HTTP status code.
                    example: 400
                    type: integer
                  requestId:
                    description: Unique id assigned to every request. UUIDv4
                    type: string
                    format: uuid
                    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)$
                required:
                  - error
                  - status
                  - requestId
                additionalProperties: false
        '500':
          description: >-
            An internal server error has occurred. If this issue persists,
            please contact ClickHouse Cloud support for assistance.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    description: Error message.
                    type: string
                  status:
                    type: integer
                    description: HTTP status code.
                    example: 500
                  requestId:
                    description: Unique id assigned to every request. UUIDv4
                    type: string
                    format: uuid
                    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)$
                required:
                  - error
                  - status
                  - requestId
                additionalProperties: {}
components:
  schemas:
    UdfListResponse:
      type: object
      properties:
        items:
          description: Latest version of each UDF in the organization.
          type: array
          items:
            $ref: '#/components/schemas/Udf'
        pagination:
          $ref: '#/components/schemas/Pagination'
      required:
        - items
        - pagination
      additionalProperties: false
    Udf:
      type: object
      properties:
        functionName:
          description: Name of the UDF. Unique within the organization.
          type: string
        version:
          description: Version number of the UDF.
          example: 1
          type: integer
          exclusiveMinimum: 0
        status:
          description: Build state of this UDF version.
          type: string
          enum:
            - building
            - error
            - ready
        runtime:
          description: Runtime used to execute the UDF command.
          type: string
          enum:
            - python3.11
            - native
        type:
          description: Executable UDF type.
          type: string
          enum:
            - executable
            - executable_pool
        arguments:
          description: Arguments passed to the UDF command.
          type: array
          items:
            type: object
            properties:
              name:
                description: >-
                  Name of the argument. Required for Native and JSONEachRow
                  formats.
                type: string
                pattern: ^[A-Za-z][A-Za-z0-9_]*$
              type:
                description: ClickHouse data type of the argument.
                type: string
            required:
              - name
              - type
            additionalProperties: false
        returnType:
          description: ClickHouse data type of the returned value.
          type: string
        returnName:
          description: Name of the returned value, or null when unnamed.
          anyOf:
            - type: string
            - type: 'null'
        poolSize:
          description: Command pool size for executable_pool UDFs.
          anyOf:
            - type: integer
              exclusiveMinimum: 0
            - type: 'null'
        commandReadTimeout:
          description: Command stdout read timeout in milliseconds.
          type: integer
          exclusiveMinimum: 0
        commandWriteTimeout:
          description: Command stdin write timeout in milliseconds.
          type: integer
          exclusiveMinimum: 0
        maxCommandExecutionTime:
          description: Maximum command execution time in seconds for executable_pool UDFs.
          anyOf:
            - type: integer
              exclusiveMinimum: 0
            - type: 'null'
        sendChunkHeader:
          description: Whether ClickHouse sends a row-count chunk header.
          type: boolean
        format:
          description: Input and output format used by the UDF command.
          type: string
        sandboxType:
          description: Sandbox isolation level.
          type: string
          enum:
            - basic
            - netenable
        sandboxVersion:
          description: Sandbox runtime version.
          type: string
          enum:
            - v1
            - v2
            - v3
        error:
          description: Build error, or null when no build error is present.
          anyOf:
            - type: string
            - type: 'null'
        createdAt:
          description: Creation timestamp.
          type: string
          format: date-time
        updatedAt:
          description: Last-update timestamp.
          type: string
          format: date-time
      required:
        - functionName
        - version
        - status
        - runtime
        - type
        - arguments
        - returnType
        - returnName
        - poolSize
        - commandReadTimeout
        - commandWriteTimeout
        - maxCommandExecutionTime
        - sendChunkHeader
        - format
        - sandboxType
        - sandboxVersion
        - error
        - createdAt
        - updatedAt
      additionalProperties: false
    Pagination:
      type: object
      properties:
        totalRecords:
          description: Total number of records available.
          type: integer
        currentCursor:
          description: Cursor for the current page. Null for the first page.
          anyOf:
            - type: string
            - type: 'null'
        nextCursor:
          description: Cursor for the next page. Null if there are no more results.
          anyOf:
            - type: string
            - type: 'null'
        limit:
          description: Maximum number of records returned per page.
          type: integer
      required:
        - totalRecords
        - currentCursor
        - nextCursor
        - limit
      additionalProperties: false
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: >-
        Use key ID and key secret obtained in ClickHouse Cloud console:
        https://clickhouse.com/docs/cloud/manage/openapi

````