Apache Hudi Tables API

Hudi table management operations

OpenAPI Specification

apache-hudi-tables-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Apache Hudi Timeline Server Tables API
  version: 0.15.0
  description: REST API for the Apache Hudi Timeline Server providing table timeline, commit metadata, and table management operations for Hudi data lake tables.
  contact:
    email: dev@hudi.apache.org
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
- url: http://localhost:9090
  description: Hudi Timeline Server
tags:
- name: Tables
  description: Hudi table management operations
paths:
  /v1/hoodie/table:
    post:
      operationId: createTable
      summary: Apache Hudi Create Table
      description: Create a new Hudi table with the provided configuration.
      tags:
      - Tables
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HudiTable'
      responses:
        '201':
          description: Table created
        '400':
          description: Invalid configuration
  /v1/hoodie/table/{tableName}:
    get:
      operationId: getTable
      summary: Apache Hudi Get Table
      description: Get configuration and metadata for a Hudi table.
      tags:
      - Tables
      parameters:
      - name: tableName
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Table retrieved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HudiTable'
        '404':
          description: Table not found
  /v1/hoodie/table/{tableName}/clean:
    post:
      operationId: runCleaning
      summary: Apache Hudi Run Cleaning
      description: Trigger a cleaning operation on a Hudi table to remove old file versions.
      tags:
      - Tables
      parameters:
      - name: tableName
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CleanConfig'
      responses:
        '200':
          description: Cleaning completed
components:
  schemas:
    HudiTable:
      type: object
      description: Apache Hudi table metadata and configuration
      properties:
        tableName:
          type: string
          description: Hudi table name
          example: orders
        basePath:
          type: string
          description: HDFS or S3 base path for the table
          example: s3://my-bucket/hudi/orders
        tableType:
          type: string
          description: Table type (COPY_ON_WRITE or MERGE_ON_READ)
          example: COPY_ON_WRITE
        schema:
          type: string
          description: Avro schema string for the table
          example: '{}'
        preCombineField:
          type: string
          description: Field used for deduplication ordering
          example: ts
        recordKeyField:
          type: string
          description: Field used as record key
          example: order_id
        partitionPathField:
          type: string
          description: Field used for partitioning
          example: order_date
    CleanConfig:
      type: object
      description: Hudi table cleaning configuration for managing old file versions
      properties:
        policy:
          type: string
          description: Cleaning policy (KEEP_LATEST_COMMITS or KEEP_LATEST_FILE_VERSIONS)
          example: KEEP_LATEST_COMMITS
        retainCommits:
          type: integer
          description: Number of commits to retain (for KEEP_LATEST_COMMITS)
          example: 10
        retainFileVersions:
          type: integer
          description: Number of file versions to retain (for KEEP_LATEST_FILE_VERSIONS)
          example: 3
        triggerStrategy:
          type: string
          description: When to trigger cleaning (NUM_COMMITS or TIME_ELAPSED_SECONDS)
          example: NUM_COMMITS