Snowflake Stream API

The Snowflake Stream API is a REST API that you can use to access, update, and perform certain actions on Stream resource in a Snowflake database.

OpenAPI Specification

stream.yaml Raw ↑
openapi: 3.0.0
servers:
- description: Snowflake REST Server
  url: https://org-account.snowflakecomputing.com
info:
  version: 0.0.1
  title: Snowflake Stream API
  description: The Snowflake Stream API is a REST API that you can use to access, update, and perform certain actions on Stream resource in a Snowflake database.
  contact:
    name: Snowflake, Inc.
    url: https://snowflake.com
    email: support@snowflake.com
paths:
  /api/v2/databases/{database}/schemas/{schema}/streams:
    get:
      summary: List Streams
      tags:
      - stream
      description: List streams
      operationId: listStreams
      parameters:
      - $ref: common.yaml#/components/parameters/database
      - $ref: common.yaml#/components/parameters/schema
      - $ref: common.yaml#/components/parameters/like
      - $ref: common.yaml#/components/parameters/startsWith
      - $ref: common.yaml#/components/parameters/showLimit
      - $ref: common.yaml#/components/parameters/fromName
      responses:
        '200':
          description: successful
          headers:
            X-Snowflake-Request-ID:
              $ref: common.yaml#/components/headers/X-Snowflake-Request-ID
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Stream'
              examples:
                Liststreams200Example:
                  summary: Default listStreams 200 response
                  x-microcks-default: true
                  value:
                  - created_on: '2026-01-15T10:30:00Z'
                    name: Example Title
                    stream_source:
                      src_type: example_value
                      name: Example Title
                      database_name: example_value
                      schema_name: example_value
                    comment: example_value
                    database_name: example_value
                    schema_name: example_value
                    owner: example_value
                    table_name: example_value
                    stale: true
                    mode: example_value
                    stale_after: '2026-01-15T10:30:00Z'
                    invalid_reason: example_value
                    owner_role_type: example_value
                    type: example_value
        '202':
          $ref: common.yaml#/components/responses/202SuccessAcceptedResponse
        '400':
          $ref: common.yaml#/components/responses/400BadRequest
        '401':
          $ref: common.yaml#/components/responses/401Unauthorized
        '403':
          $ref: common.yaml#/components/responses/403Forbidden
        '404':
          $ref: common.yaml#/components/responses/404NotFound
        '405':
          $ref: common.yaml#/components/responses/405MethodNotAllowed
        '408':
          $ref: common.yaml#/components/responses/408RequestTimeout
        '409':
          $ref: common.yaml#/components/responses/409Conflict
        '410':
          $ref: common.yaml#/components/responses/410Gone
        '429':
          $ref: common.yaml#/components/responses/429LimitExceeded
        '500':
          $ref: common.yaml#/components/responses/500InternalServerError
        '503':
          $ref: common.yaml#/components/responses/503ServiceUnavailable
        '504':
          $ref: common.yaml#/components/responses/504GatewayTimeout
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      summary: Create a Stream
      tags:
      - stream
      description: Create a stream
      operationId: createStream
      parameters:
      - $ref: common.yaml#/components/parameters/database
      - $ref: common.yaml#/components/parameters/schema
      - $ref: common.yaml#/components/parameters/createMode
      - $ref: common.yaml#/components/parameters/copyGrants
      responses:
        '200':
          $ref: common.yaml#/components/responses/200SuccessResponse
        '202':
          $ref: common.yaml#/components/responses/202SuccessAcceptedResponse
        '400':
          $ref: common.yaml#/components/responses/400BadRequest
        '401':
          $ref: common.yaml#/components/responses/401Unauthorized
        '403':
          $ref: common.yaml#/components/responses/403Forbidden
        '404':
          $ref: common.yaml#/components/responses/404NotFound
        '405':
          $ref: common.yaml#/components/responses/405MethodNotAllowed
        '408':
          $ref: common.yaml#/components/responses/408RequestTimeout
        '409':
          $ref: common.yaml#/components/responses/409Conflict
        '410':
          $ref: common.yaml#/components/responses/410Gone
        '429':
          $ref: common.yaml#/components/responses/429LimitExceeded
        '500':
          $ref: common.yaml#/components/responses/500InternalServerError
        '503':
          $ref: common.yaml#/components/responses/503ServiceUnavailable
        '504':
          $ref: common.yaml#/components/responses/504GatewayTimeout
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Stream'
            examples:
              CreatestreamRequestExample:
                summary: Default createStream request
                x-microcks-default: true
                value:
                  created_on: '2026-01-15T10:30:00Z'
                  name: Example Title
                  stream_source:
                    src_type: example_value
                    name: Example Title
                    database_name: example_value
                    schema_name: example_value
                  comment: example_value
                  database_name: example_value
                  schema_name: example_value
                  owner: example_value
                  table_name: example_value
                  stale: true
                  mode: example_value
                  stale_after: '2026-01-15T10:30:00Z'
                  invalid_reason: example_value
                  owner_role_type: example_value
                  type: example_value
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /api/v2/databases/{database}/schemas/{schema}/streams/{name}:
    get:
      summary: Fetch a Stream
      tags:
      - stream
      description: Fetch a stream
      operationId: fetchStream
      parameters:
      - $ref: common.yaml#/components/parameters/database
      - $ref: common.yaml#/components/parameters/schema
      - $ref: common.yaml#/components/parameters/name
      responses:
        '200':
          description: successful
          headers:
            X-Snowflake-Request-ID:
              $ref: common.yaml#/components/headers/X-Snowflake-Request-ID
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Stream'
              examples:
                Fetchstream200Example:
                  summary: Default fetchStream 200 response
                  x-microcks-default: true
                  value:
                    created_on: '2026-01-15T10:30:00Z'
                    name: Example Title
                    stream_source:
                      src_type: example_value
                      name: Example Title
                      database_name: example_value
                      schema_name: example_value
                    comment: example_value
                    database_name: example_value
                    schema_name: example_value
                    owner: example_value
                    table_name: example_value
                    stale: true
                    mode: example_value
                    stale_after: '2026-01-15T10:30:00Z'
                    invalid_reason: example_value
                    owner_role_type: example_value
                    type: example_value
        '202':
          $ref: common.yaml#/components/responses/202SuccessAcceptedResponse
        '400':
          $ref: common.yaml#/components/responses/400BadRequest
        '401':
          $ref: common.yaml#/components/responses/401Unauthorized
        '403':
          $ref: common.yaml#/components/responses/403Forbidden
        '404':
          $ref: common.yaml#/components/responses/404NotFound
        '405':
          $ref: common.yaml#/components/responses/405MethodNotAllowed
        '408':
          $ref: common.yaml#/components/responses/408RequestTimeout
        '409':
          $ref: common.yaml#/components/responses/409Conflict
        '410':
          $ref: common.yaml#/components/responses/410Gone
        '429':
          $ref: common.yaml#/components/responses/429LimitExceeded
        '500':
          $ref: common.yaml#/components/responses/500InternalServerError
        '503':
          $ref: common.yaml#/components/responses/503ServiceUnavailable
        '504':
          $ref: common.yaml#/components/responses/504GatewayTimeout
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    delete:
      summary: Delete a Stream
      tags:
      - stream
      description: Delete a stream
      operationId: deleteStream
      parameters:
      - $ref: common.yaml#/components/parameters/database
      - $ref: common.yaml#/components/parameters/schema
      - $ref: common.yaml#/components/parameters/name
      - $ref: common.yaml#/components/parameters/ifExists
      responses:
        '200':
          $ref: common.yaml#/components/responses/200SuccessResponse
        '202':
          $ref: common.yaml#/components/responses/202SuccessAcceptedResponse
        '400':
          $ref: common.yaml#/components/responses/400BadRequest
        '401':
          $ref: common.yaml#/components/responses/401Unauthorized
        '403':
          $ref: common.yaml#/components/responses/403Forbidden
        '404':
          $ref: common.yaml#/components/responses/404NotFound
        '405':
          $ref: common.yaml#/components/responses/405MethodNotAllowed
        '408':
          $ref: common.yaml#/components/responses/408RequestTimeout
        '409':
          $ref: common.yaml#/components/responses/409Conflict
        '410':
          $ref: common.yaml#/components/responses/410Gone
        '429':
          $ref: common.yaml#/components/responses/429LimitExceeded
        '500':
          $ref: common.yaml#/components/responses/500InternalServerError
        '503':
          $ref: common.yaml#/components/responses/503ServiceUnavailable
        '504':
          $ref: common.yaml#/components/responses/504GatewayTimeout
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /api/v2/databases/{database}/schemas/{schema}/streams/{name}:clone:
    post:
      summary: Clone a Stream
      tags:
      - stream
      description: Clone a stream
      operationId: cloneStream
      parameters:
      - $ref: common.yaml#/components/parameters/database
      - $ref: common.yaml#/components/parameters/schema
      - $ref: common.yaml#/components/parameters/name
      - $ref: common.yaml#/components/parameters/createMode
      - name: targetDatabase
        description: Database of the target resource. Defaults to the source's database
        in: query
        required: true
        schema:
          type: string
          pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$
        example: example_value
      - name: targetSchema
        description: Schema of the target resource. Defaults to the source's schema
        in: query
        required: true
        schema:
          type: string
          pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$
        example: example_value
      - $ref: common.yaml#/components/parameters/copyGrants
      responses:
        '200':
          $ref: common.yaml#/components/responses/200SuccessResponse
        '202':
          $ref: common.yaml#/components/responses/202SuccessAcceptedResponse
        '400':
          $ref: common.yaml#/components/responses/400BadRequest
        '401':
          $ref: common.yaml#/components/responses/401Unauthorized
        '403':
          $ref: common.yaml#/components/responses/403Forbidden
        '404':
          $ref: common.yaml#/components/responses/404NotFound
        '405':
          $ref: common.yaml#/components/responses/405MethodNotAllowed
        '408':
          $ref: common.yaml#/components/responses/408RequestTimeout
        '409':
          $ref: common.yaml#/components/responses/409Conflict
        '410':
          $ref: common.yaml#/components/responses/410Gone
        '429':
          $ref: common.yaml#/components/responses/429LimitExceeded
        '500':
          $ref: common.yaml#/components/responses/500InternalServerError
        '503':
          $ref: common.yaml#/components/responses/503ServiceUnavailable
        '504':
          $ref: common.yaml#/components/responses/504GatewayTimeout
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StreamClone'
            examples:
              ClonestreamRequestExample:
                summary: Default cloneStream request
                x-microcks-default: true
                value:
                  name: Example Title
                  comment: example_value
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas:
    Stream:
      type: object
      description: A Snowflake stream
      properties:
        created_on:
          type: string
          format: date-time
          readOnly: true
          description: Date and time when the stream was created.
          example: '2026-01-15T10:30:00Z'
        name:
          type: string
          pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$
          description: Name of the stream
          example: Example Title
        stream_source:
          $ref: '#/components/schemas/StreamSource'
          description: Source for the stream
        comment:
          type: string
          description: user comment associated to an object in the dictionary
          example: example_value
        database_name:
          type: string
          pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$
          readOnly: true
          description: Database in which the stream is stored
          example: example_value
        schema_name:
          type: string
          pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$
          readOnly: true
          description: Schema in which the stream is stored
          example: example_value
        owner:
          type: string
          pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$
          readOnly: true
          description: Role that owns the stream
          example: example_value
        table_name:
          type: string
          pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$
          readOnly: true
          description: Table name whose changes are tracked by the stream
          example: example_value
        stale:
          type: boolean
          readOnly: true
          description: Specifies whether the stream is stale or not
          example: true
        mode:
          type: string
          readOnly: true
          description: 'Mode of the stream. Possible values include: APPEND_ONLY, INSERT_ONLY. For streams on tables, the column displays DEFAULT.'
          example: example_value
        stale_after:
          type: string
          format: date-time
          readOnly: true
          description: 'Timestamp when the stream became stale or may become stale if not consumed. '
          example: '2026-01-15T10:30:00Z'
        invalid_reason:
          type: string
          readOnly: true
          description: Reason why the stream cannot be queried successfully. This column supports future functionality. Currently, the only value returned is N/A.
          example: example_value
        owner_role_type:
          type: string
          pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$
          readOnly: true
          description: The type of role that owns the stream
          example: example_value
        type:
          type: string
          readOnly: true
          description: Type of the stream; currently DELTA only.
          example: example_value
      required:
      - name
      - stream_source
    StreamSource:
      type: object
      properties:
        src_type:
          type: string
          description: 'Type of the source. Possible values include: stream, table, view'
          example: example_value
        name:
          type: string
          pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$
          description: Name of the source whose changes are tracked by the stream
          example: Example Title
        database_name:
          type: string
          pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$
          description: Database name to which stream source type belongs. If not provided, database  name provided in the path param will be used.
          example: example_value
        schema_name:
          type: string
          pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$
          description: Schema name to which stream source type belongs. If not provided, schema name provided in the path param will be used.
          example: example_value
      required:
      - src_type
      - name
      discriminator:
        propertyName: src_type
        mapping:
          table: StreamSourceTable
          external_table: StreamSourceExternalTable
          view: StreamSourceView
          stage: StreamSourceStage
    StreamSourceTable:
      type: object
      allOf:
      - $ref: '#/components/schemas/StreamSource'
      properties:
        append_only:
          type: boolean
          description: Whether this stream is an append only stream or not
          example: true
        show_initial_rows:
          type: boolean
          description: Whether this stream show initial rows on first consumption
          example: true
        point_of_time:
          $ref: '#/components/schemas/PointOfTime'
          description: Point of time for the stream
    PointOfTime:
      type: object
      properties:
        point_of_time_type:
          type: string
          description: 'Type of the point of time. Possible values include: timestamp, offset, statement'
          example: example_value
        reference:
          type: string
          enum:
          - at
          - before
          x-enum-varnames:
          - AT
          - BEFORE
          description: Relation to the point of time.  Currently, the API supports `at` and `before`
          example: at
      required:
      - point_of_time_type
      - reference
      discriminator:
        propertyName: point_of_time_type
        mapping:
          timestamp: PointOfTimeTimestamp
          offset: PointOfTimeOffset
          statement: PointOfTimeStatement
          stream: PointOfTimeStream
    PointOfTimeTimestamp:
      type: object
      allOf:
      - $ref: '#/components/schemas/PointOfTime'
      properties:
        timestamp:
          type: string
          description: Timestamp of the point of time.
          example: example_value
      required:
      - timestamp
    PointOfTimeOffset:
      type: object
      allOf:
      - $ref: '#/components/schemas/PointOfTime'
      properties:
        offset:
          type: string
          description: Point of time identified by an offset in reference to the current time, such as `10 min`.
          example: example_value
      required:
      - offset
    PointOfTimeStatement:
      type: object
      allOf:
      - $ref: '#/components/schemas/PointOfTime'
      properties:
        statement:
          type: string
          description: Statement of the point of time.
          example: example_value
      required:
      - statement
    PointOfTimeStream:
      type: object
      allOf:
      - $ref: '#/components/schemas/PointOfTime'
      properties:
        stream:
          type: string
          description: 'Creates the new stream at the same offset as the specified stream. '
          example: example_value
    StreamSourceExternalTable:
      type: object
      allOf:
      - $ref: '#/components/schemas/StreamSource'
      properties:
        insert_only:
          type: boolean
          description: Whether this stream is an insert only stream or not
          example: true
        point_of_time:
          $ref: '#/components/schemas/PointOfTime'
          description: Point of time for the stream
    StreamSourceView:
      type: object
      allOf:
      - $ref: '#/components/schemas/StreamSource'
      properties:
        append_only:
          type: boolean
          description: Whether this stream is an append only stream or not
          example: true
        show_initial_rows:
          type: boolean
          description: Whether this stream show initial rows on first consumption
          example: true
        point_of_time:
          $ref: '#/components/schemas/PointOfTime'
          description: Point of time for the stream
        base_tables:
          type: array
          items:
            type: string
            pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$
          readOnly: true
          description: List of base tables for the stream
          example: []
    StreamSourceStage:
      type: object
      allOf:
      - $ref: '#/components/schemas/StreamSource'
    StreamClone:
      type: object
      properties:
        name:
          type: string
          pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$
          description: Name of the stream
          example: Example Title
        comment:
          type: string
          description: user comment associated to an object in the dictionary
          example: example_value
      required:
      - name