Treasure Data Bulk Loads API

Bulk load sessions from external sources

OpenAPI Specification

treasure-data-bulk-loads-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Treasure Data TD Bulk Import Bulk Loads API
  description: 'Core REST API for managing databases, tables, jobs, bulk imports, connectors, and users within the Treasure Data Customer Data Platform. Supports Presto and Hive query execution on big data warehouses.

    '
  version: v3
  contact:
    url: https://docs.treasure.ai/apis/td-api
  license:
    name: Treasure Data Terms of Service
    url: https://www.treasure.ai/
servers:
- url: https://api.treasuredata.com/v3
  description: Treasure Data API v3
security:
- TDAuth: []
tags:
- name: Bulk Loads
  description: Bulk load sessions from external sources
paths:
  /bulk_loads:
    get:
      operationId: listBulkLoads
      summary: List bulk load sessions
      description: Returns the list of available bulk load sessions.
      tags:
      - Bulk Loads
      responses:
        '200':
          description: List of bulk loads
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BulkLoad'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /bulk_loads/{name}:
    get:
      operationId: getBulkLoad
      summary: Get bulk load session
      description: Retrieves a specific bulk load session by name.
      tags:
      - Bulk Loads
      parameters:
      - name: name
        in: path
        required: true
        schema:
          type: string
        description: Name of the bulk load session
      responses:
        '200':
          description: Bulk load session details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkLoad'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /bulk_loads/{name}/jobs:
    get:
      operationId: listBulkLoadJobs
      summary: List bulk load jobs
      description: Lists the executed job history for the specified bulk load session.
      tags:
      - Bulk Loads
      parameters:
      - name: name
        in: path
        required: true
        schema:
          type: string
        description: Name of the bulk load session
      responses:
        '200':
          description: List of bulk load jobs
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BulkLoadJob'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  responses:
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: Resource not found
    Unauthorized:
      description: Authentication required or API key invalid
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
  schemas:
    BulkLoadJob:
      type: object
      properties:
        account_id:
          type: integer
        status:
          type: string
        records:
          type: integer
        schema:
          type: string
        job_id:
          type: string
        type:
          type: string
        config:
          type: object
        database:
          type: string
        table:
          type: string
        created_at:
          type: string
          format: date-time
        start_at:
          type: string
          format: date-time
        end_at:
          type: string
          format: date-time
    BulkLoad:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        cron:
          type: string
          description: Cron schedule expression
        timezone:
          type: string
        delay:
          type: integer
        database:
          type: string
        table:
          type: string
        config:
          type: object
          description: Bulk load source configuration
        config_diff:
          type: object
          description: Configuration diff from last run
  securitySchemes:
    TDAuth:
      type: apiKey
      in: header
      name: Authorization
      description: 'Treasure Data API key authentication. Set header value to "TD1 <your-api-key>".

        '