> ## Documentation Index
> Fetch the complete documentation index at: https://domoinc-openapi-sync-dataflows.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a Stream

> When creating a Stream, specify the DataSet properties (name and description) and as a convenience, the create Stream API will create a DataSet for you.

Streams support both append and replace import methods, as well as Upsert. In order to create an Upsert dataset you must specify the Upsert key column(s) in keyColumnNames and set updateMethod to APPEND.

<Note>
**Limitation**

The StreamAPI currently only allows you to import data to a DataSet created via the Stream API. For example, it is currently not supported to import data to a DataSet created by a Domo Connector.
</Note>



## OpenAPI

````yaml /openapi/platform/stream.yaml POST /v1/streams
openapi: 3.1.0
info:
  title: Stream API
  version: '1.0'
  description: >
    The Stream API allows you to automate the creation of new DataSets in your
    Domo Warehouse, featuring an accelerated upload Stream. A Domo Stream
    expedites uploads by dividing your data into parts, and uploading all of
    these parts simultaneously.


    <!-- theme: info -->

    > ### Best Practices

    >

    > This API should be used to create and update massive, constantly changing,
    or rapidly growing DataSets. For creating and updating smaller DataSets that
    occasionally need data updated, leverage the DataSet API. 



    ## The Stream Object


    ## Stream Attributes

    Property Name | Type | Description

    ------- | ------- | -------

    id | Number | ID of the Stream

    modifiedAt | String | An ISO-8601 representation of the time the Stream was
    last updated

    updateMethod | String | The data import behavior

    createdAt | String | An ISO-8601 representation of the create date of the
    Stream


    ### Stream's DataSet Attributes

    Property Name | Type | Description

    ------- | ------- | -------

    id | String  | The UID of the DataSet associated to the Stream

    name | String | The description of the DataSet associated to the Stream

    description | String | The ID of the DataSet associated to the Stream

    rows | Number | The number of rows in the DataSet

    columns | Number | The number of columns in the DataSet's schema

    owner_id | Number | The ID of the owner of the Stream's underlying DataSet

    owner_name | String | The name of the owner of the Stream's underlying
    DataSet

    pdpEnabled | Boolean | Indicates if PDP [Personalized Data Permission]
    policy filtering on data is active on this DataSet
servers:
  - url: https://api.domo.com
    description: Domo API
security:
  - bearerAuth: []
paths:
  /v1/streams:
    parameters: []
    post:
      summary: Create a Stream
      description: >-
        When creating a Stream, specify the DataSet properties (name and
        description) and as a convenience, the create Stream API will create a
        DataSet for you.


        Streams support both append and replace import methods, as well as
        Upsert. In order to create an Upsert dataset you must specify the Upsert
        key column(s) in keyColumnNames and set updateMethod to APPEND.


        <Note>

        **Limitation**


        The StreamAPI currently only allows you to import data to a DataSet
        created via the Stream API. For example, it is currently not supported
        to import data to a DataSet created by a Domo Connector.

        </Note>
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              x-examples:
                Example 1:
                  dataSet:
                    name: Leonhard Euler Party
                    description: Mathematician Guest List
                    schema:
                      columns:
                        - type: STRING
                          name: Friend
                        - type: STRING
                          name: Attending
                  updateMethod: APPEND
              required:
                - dataSet
              properties:
                dataSet:
                  type: object
                  description: The Dataset object to be created with the Stream
                  properties:
                    name:
                      type: string
                    description:
                      type: string
                    schema:
                      type: object
                      properties:
                        columns:
                          type: array
                          items:
                            type: object
                            properties:
                              type:
                                type: string
                              name:
                                type: string
                updateMethod:
                  type: string
                  description: 'The data import behavior: "APPEND" or "REPLACE"'
                keyColumnNames:
                  type: array
                  description: '`keyColumnNames` defines the upsert key for upsert Datasets.'
                  items:
                    type: string
            examples:
              Example 1:
                value:
                  dataSet:
                    name: Leonhard Euler Party
                    description: Mathematician Guest List
                    schema:
                      columns:
                        - type: STRING
                          name: Friend
                        - type: STRING
                          name: Attending
                  updateMethod: APPEND
      responses:
        '200':
          description: >-
            Returns a DataSet object when successful. The returned object will
            have DataSet attributes based on the information that was provided
            when DataSet was created from the Stream created.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  dataSet:
                    type: object
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                      description:
                        type: string
                      rows:
                        type: integer
                      columns:
                        type: integer
                      owner:
                        type: object
                        properties:
                          id:
                            type: integer
                          name:
                            type: string
                      createdAt:
                        type: string
                      updatedAt:
                        type: string
                      pdpEnabled:
                        type: boolean
                  updateMethod:
                    type: string
                  createdAt:
                    type: string
                  modifiedAt:
                    type: string
                x-examples:
                  Example 1:
                    id: 42
                    dataSet:
                      id: 0c1e0dbe-9f71-4625-9b50-b79e6e4266f2
                      name: Leonhard Euler Party
                      description: Mathematician Guest List
                      rows: 0
                      columns: 0
                      owner:
                        id: 27
                        name: DomoSupport
                      createdAt: '2016-05-27T17:53:04Z'
                      updatedAt: '2016-05-27T17:53:10Z'
                      pdpEnabled: false
                    updateMethod: APPEND
                    createdAt: '2016-05-27T17:53:05Z'
                    modifiedAt: '2016-05-27T17:53:05Z'
              examples:
                Example 1:
                  value:
                    id: 42
                    dataSet:
                      id: 0c1e0dbe-9f71-4625-9b50-b79e6e4266f2
                      name: Leonhard Euler Party
                      description: Mathematician Guest List
                      rows: 0
                      columns: 0
                      owner:
                        id: 27
                        name: DomoSupport
                      createdAt: '2016-05-27T17:53:04Z'
                      updatedAt: '2016-05-27T17:53:10Z'
                      pdpEnabled: false
                    updateMethod: APPEND
                    createdAt: '2016-05-27T17:53:05Z'
                    modifiedAt: '2016-05-27T17:53:05Z'
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````