> ## Documentation Index
> Fetch the complete documentation index at: https://docs.powerdrill.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Create data source without specifying a dataset

> Creates a data source without specifying a dataset.

When calling this endpoint, Powerdrill will automatically create a dataset for the new data source. Save the dataset ID returned in the response so that you can [associate it with a job](/api-reference/v2/create-job) and explore the data source.



## OpenAPI

````yaml POST /v2/team/datasources
openapi: 3.0.1
info:
  title: Team Open API Snake
  description: ''
  version: 1.0.0
servers:
  - url: https://ai.data.cloud/api
    description: 体验环境
security:
  - apikey-header-x-pd-api-key: []
tags:
  - name: Session
  - name: Dataset
  - name: Data source
  - name: File
  - name: Job
paths:
  /v2/team/datasources:
    post:
      tags:
        - Data source
      summary: Create data source without specifying a dataset
      description: >-
        Creates a data source without specifying a dataset.


        When calling this endpoint, Powerdrill will automatically create a
        dataset for the new data source. Save the dataset ID returned in the
        response so that you can [associate it with a
        job](/api-reference/v2/create-job) and explore the data source.
      parameters:
        - name: x-pd-external-trace-id
          in: header
          description: >-
            The trace ID you set in your system to trace this request. It can be
            up to 128 characters in length. If the request fails, you can
            provide it to the Powerdrill team to help with troubleshooting.
          required: false
          example: ''
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DataSourceConfig'
            example:
              name: test.csv
              type: FILE
              user_id: tmm-dafasdfasdfasdf
              file_object_key: /tmp/sdgsagdsgsadgasdg
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    description: >-
                      Status code. **0** indicates that the operation is
                      successful. Otherwise, the operation fails. For error
                      troubleshooting, refer to [Error
                      Codes](/api-reference/error-codes).
                  data:
                    description: A data source object.
                    type: object
                    properties:
                      id:
                        type: string
                        description: >-
                          The data source ID, which uniquely identifies the data
                          source.
                      dataset_id:
                        type: string
                        description: The ID of the dataset that hosts the data source.
                      name:
                        type: string
                        description: The data source name.
                      type:
                        type: string
                        description: >-
                          The type of the data source, which is fixed to
                          **FILE**.
                        enum:
                          - FILE
                      status:
                        type: string
                        description: >-
                          The processing status of the data source. Possible
                          values are:

                          - `invalid`: Awaiting processing.

                          - `synching`: Currently processing.

                          - `synched`: Successfully synchronized.
                        enum:
                          - synching
                          - synched
                          - invalid
                    required:
                      - id
                      - dataset_id
                      - name
                      - type
                      - status
                required:
                  - data
                  - code
              example:
                code: 0
                data:
                  id: ds-cm7aedl58000501fc52hjj5c3
                  name: ds1.xlsx
                  type: FILE
                  status: synched
                  dataset_id: dset-cm7ae4d77028n01l1cnapd5si
          headers:
            x-pd-trace-id:
              example: ''
              required: true
              description: >-
                The trace ID returned by Powerdrill. If a failure occurs, you
                can provide it to the Powerdrill team to assist with
                troubleshooting.
              schema:
                type: string
      deprecated: false
      security:
        - apikey-header-x-pd-api-key: []
components:
  schemas:
    DataSourceConfig:
      type: object
      properties:
        name:
          type: string
          description: >-
            The name of the data source, including the file extension (e.g.,
            `example.csv`). The name must be between 1 and 128 characters. If it
            exceeds this limit, it will be truncated.
        type:
          type: string
          description: The type of the data source. Set it to **FILE**.
          title: FILE
        url:
          type: string
          description: >-
            The URL of the file for public access. 


            You must specify either `url` or `file_object_key`, but not both.


            Only files with the following extensions are supported: **.csv**,
            **.tsv**, **.md**, **.mdx**, **.json**, **.txt**, **.pdf**,
            **.pptx**, **.docx**, **.xls**, or **.xlsx**.
        file_object_key:
          type: string
          description: >
            The object storage path to your locally uploaded file.


            You must specify either `url` or `file_object_key`, but not both.


            Only files with the following extensions are supported: **.csv**,
            **.tsv**, **.md**, **.mdx**, **.json**, **.txt**, **.pdf**,
            **.pptx**, **.docx**, **.xls**, or **.xlsx**.


            How to obtain:


            Each time you upload a file through the [Upload
            file](/api-reference/v2/upload-file) endpoint, its `file_object_key`
            is returned. For more details, see [How to Upload Local
            Files](/developer-guides/upload-file).
        user_id:
          type: string
          description: >-
            Your user ID, which uniquely identifies you within your team. To
            obtain your ID:


            - If you're the team admin, refer to [Check user
            information](/enterprise/users#check-user-information).

            - If you're a system or virtual user, ask your team admin to check
            your user ID by referring to [Check user
            information](/enterprise/users#check-user-information).
      required:
        - type
        - name
        - user_id
  securitySchemes:
    apikey-header-x-pd-api-key:
      type: apiKey
      in: header
      name: x-pd-api-key

````