Decodable Resources API

Account-level and cross-cutting control-plane endpoints, including retrieving account details (and the data-plane hostname) and the declarative apply model that manages connections, streams, pipelines, and secrets as versioned YAML resources.

OpenAPI Specification

decodable-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Decodable Control Plane API
  description: >-
    REST API for the Decodable managed stream-processing platform (built on
    Apache Flink and Debezium). The control-plane API manages connections,
    streams, pipelines, secrets, and account-level resources. The control-plane
    base URL is account-scoped: https://<account>.api.decodable.co. All requests
    are authenticated with a Bearer access token (the token issued after CLI
    login, found in ~/.decodable/auth). Endpoints and schemas in this document
    reflect publicly documented Decodable API behavior; fields not confirmed in
    public documentation are intentionally omitted rather than fabricated.
  termsOfService: https://www.decodable.co/terms-of-service
  contact:
    name: Decodable Support
    url: https://docs.decodable.co
  version: v1alpha2
servers:
  - url: https://{account}.api.decodable.co
    description: Decodable control-plane API (account-scoped)
    variables:
      account:
        default: acme-01
        description: Your Decodable account name
security:
  - bearerAuth: []
tags:
  - name: Connections
    description: Source and sink connectors between Decodable and external systems.
  - name: Streams
    description: Typed, schema-bearing channels that carry records.
  - name: Pipelines
    description: SQL or custom Apache Flink transformations over streams.
  - name: Secrets
    description: Securely stored credentials referenced by connections.
  - name: Resources
    description: Account-level and control-plane resource endpoints.
paths:
  /v1alpha2/connections/:
    get:
      operationId: listConnections
      tags:
        - Connections
      summary: List connections
      description: Returns the connections defined in the account.
      responses:
        '200':
          description: A list of connections.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectionList'
    post:
      operationId: createConnection
      tags:
        - Connections
      summary: Create a connection
      description: Creates a new source or sink connection.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Connection'
      responses:
        '201':
          description: The created connection.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Connection'
  /v1alpha2/connections/{connection_id}:
    parameters:
      - $ref: '#/components/parameters/ConnectionId'
    get:
      operationId: getConnection
      tags:
        - Connections
      summary: Get a connection
      responses:
        '200':
          description: The requested connection.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Connection'
    put:
      operationId: updateConnection
      tags:
        - Connections
      summary: Update a connection
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Connection'
      responses:
        '200':
          description: The updated connection.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Connection'
    delete:
      operationId: deleteConnection
      tags:
        - Connections
      summary: Delete a connection
      responses:
        '204':
          description: The connection was deleted.
  /v1alpha2/connections/{connection_id}/activate:
    parameters:
      - $ref: '#/components/parameters/ConnectionId'
    post:
      operationId: activateConnection
      tags:
        - Connections
      summary: Activate a connection
      description: Starts the connection, optionally setting task size and count.
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Execution'
      responses:
        '200':
          description: The connection activation was accepted.
  /v1alpha2/connections/{connection_id}/deactivate:
    parameters:
      - $ref: '#/components/parameters/ConnectionId'
    post:
      operationId: deactivateConnection
      tags:
        - Connections
      summary: Deactivate a connection
      description: Stops the connection.
      responses:
        '200':
          description: The connection deactivation was accepted.
  /v1alpha2/streams/:
    get:
      operationId: listStreams
      tags:
        - Streams
      summary: List streams
      responses:
        '200':
          description: A list of streams.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StreamList'
    post:
      operationId: createStream
      tags:
        - Streams
      summary: Create a stream
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Stream'
      responses:
        '201':
          description: The created stream.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Stream'
  /v1alpha2/streams/{stream_id}:
    parameters:
      - $ref: '#/components/parameters/StreamId'
    get:
      operationId: getStream
      tags:
        - Streams
      summary: Get a stream
      responses:
        '200':
          description: The requested stream.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Stream'
    put:
      operationId: updateStream
      tags:
        - Streams
      summary: Update a stream
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Stream'
      responses:
        '200':
          description: The updated stream.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Stream'
    delete:
      operationId: deleteStream
      tags:
        - Streams
      summary: Delete a stream
      responses:
        '204':
          description: The stream was deleted.
  /v1alpha2/streams/{stream_id}/preview/token:
    parameters:
      - $ref: '#/components/parameters/StreamId'
    post:
      operationId: createStreamPreviewToken
      tags:
        - Streams
      summary: Create a stream preview token
      description: >-
        Returns a short-lived data-plane token used to preview live records
        from the stream via the data-plane API.
      responses:
        '200':
          description: A preview token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Token'
  /v1alpha2/pipelines/:
    get:
      operationId: listPipelines
      tags:
        - Pipelines
      summary: List pipelines
      responses:
        '200':
          description: A list of pipelines.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PipelineList'
    post:
      operationId: createPipeline
      tags:
        - Pipelines
      summary: Create a pipeline
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Pipeline'
      responses:
        '201':
          description: The created pipeline.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Pipeline'
  /v1alpha2/pipelines/{pipeline_id}:
    parameters:
      - $ref: '#/components/parameters/PipelineId'
    get:
      operationId: getPipeline
      tags:
        - Pipelines
      summary: Get a pipeline
      responses:
        '200':
          description: The requested pipeline.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Pipeline'
    put:
      operationId: updatePipeline
      tags:
        - Pipelines
      summary: Update a pipeline
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Pipeline'
      responses:
        '200':
          description: The updated pipeline.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Pipeline'
    delete:
      operationId: deletePipeline
      tags:
        - Pipelines
      summary: Delete a pipeline
      responses:
        '204':
          description: The pipeline was deleted.
  /v1alpha2/pipelines/{pipeline_id}/activate:
    parameters:
      - $ref: '#/components/parameters/PipelineId'
    post:
      operationId: activatePipeline
      tags:
        - Pipelines
      summary: Activate a pipeline
      description: Starts the pipeline, optionally setting task size and count.
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Execution'
      responses:
        '200':
          description: The pipeline activation was accepted.
  /v1alpha2/pipelines/{pipeline_id}/deactivate:
    parameters:
      - $ref: '#/components/parameters/PipelineId'
    post:
      operationId: deactivatePipeline
      tags:
        - Pipelines
      summary: Deactivate a pipeline
      description: Stops the pipeline.
      responses:
        '200':
          description: The pipeline deactivation was accepted.
  /v1alpha2/secrets/:
    get:
      operationId: listSecrets
      tags:
        - Secrets
      summary: List secrets
      responses:
        '200':
          description: A list of secrets (metadata only; values are not returned).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SecretList'
    post:
      operationId: createSecret
      tags:
        - Secrets
      summary: Create a secret
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Secret'
      responses:
        '201':
          description: The created secret.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Secret'
  /v1alpha2/secrets/{secret_id}:
    parameters:
      - $ref: '#/components/parameters/SecretId'
    get:
      operationId: getSecret
      tags:
        - Secrets
      summary: Get a secret
      description: Returns secret metadata; the secret value is not returned.
      responses:
        '200':
          description: The requested secret.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Secret'
    put:
      operationId: updateSecret
      tags:
        - Secrets
      summary: Update a secret
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Secret'
      responses:
        '200':
          description: The updated secret.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Secret'
    delete:
      operationId: deleteSecret
      tags:
        - Secrets
      summary: Delete a secret
      responses:
        '204':
          description: The secret was deleted.
  /v1alpha2/accounts/{account_name}:
    parameters:
      - name: account_name
        in: path
        required: true
        description: The Decodable account name.
        schema:
          type: string
    get:
      operationId: getAccount
      tags:
        - Resources
      summary: Get account details
      description: >-
        Returns account details, including the data_plane_hostname used to
        construct data-plane API requests.
      responses:
        '200':
          description: The account details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Account'
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Decodable access token issued after CLI login (stored in
        ~/.decodable/auth), sent as an Authorization: Bearer header.
  parameters:
    ConnectionId:
      name: connection_id
      in: path
      required: true
      schema:
        type: string
    StreamId:
      name: stream_id
      in: path
      required: true
      schema:
        type: string
    PipelineId:
      name: pipeline_id
      in: path
      required: true
      schema:
        type: string
    SecretId:
      name: secret_id
      in: path
      required: true
      schema:
        type: string
  schemas:
    Connection:
      type: object
      properties:
        id:
          type: string
          readOnly: true
        name:
          type: string
        description:
          type: string
        connector:
          type: string
          description: The connector type (e.g. kafka, postgres-cdc, rest, s3).
        type:
          type: string
          description: Whether the connection is a source or a sink.
          enum:
            - source
            - sink
        stream_id:
          type: string
          description: The stream this connection reads from or writes to.
        properties:
          type: object
          additionalProperties:
            type: string
          description: Connector-specific configuration properties.
        execution:
          $ref: '#/components/schemas/Execution'
    ConnectionList:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/Connection'
    Stream:
      type: object
      properties:
        id:
          type: string
          readOnly: true
        name:
          type: string
        description:
          type: string
        schema_v2:
          type: object
          description: The stream's typed schema definition.
    StreamList:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/Stream'
    Pipeline:
      type: object
      properties:
        id:
          type: string
          readOnly: true
        name:
          type: string
        description:
          type: string
        sql:
          type: string
          description: The Decodable SQL that defines the transformation.
        execution:
          $ref: '#/components/schemas/Execution'
    PipelineList:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/Pipeline'
    Secret:
      type: object
      properties:
        id:
          type: string
          readOnly: true
        name:
          type: string
        description:
          type: string
        value:
          type: string
          writeOnly: true
          description: The secret value; write-only and never returned in responses.
    SecretList:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/Secret'
    Execution:
      type: object
      description: Runtime execution settings for a connection or pipeline.
      properties:
        active:
          type: boolean
        task_count:
          type: integer
        task_size:
          type: string
          description: The task size (e.g. SMALL, MEDIUM, LARGE).
    Account:
      type: object
      properties:
        name:
          type: string
        data_plane_hostname:
          type: string
          description: Host name used to build data-plane API requests.
    Token:
      type: object
      properties:
        token:
          type: string
          description: A short-lived data-plane request token.