> ## 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.

> Obtains information about the specified data source.

# Get data source

**Example request:**

<CodeGroup>
  ```curl cURL theme={null}
  curl --request GET \
    --url 'https://ai.data.cloud/api/v2/team/datasets/{dataset_id}/datasources/{datasource_id}?user_id=tmm-dafasdfasdfasdf' \
    --header 'x-pd-api-key: <api-key>' \
    --header 'x-pd-external-trace-id: '
  ```

  ```python Python theme={null}
  import requests

  url = "https://ai.data.cloud/api/v2/team/datasets/{dataset_id}/datasources/{datasource_id}?user_id=tmm-dafasdfasdfasdf"

  headers = {
      "x-pd-api-key": "gegeege",
      "x-pd-external-trace-id": ""
  }

  response = requests.request("GET", url, headers=headers, params=querystring)

  print(response.text)
  ```
</CodeGroup>

**Example response:**

```json 200 theme={null}
{
    "code": 0,
    "data": {
        "id": "ds-cm7aedl58000501fc52hjj5c3",
        "name": "ds1.xlsx",
        "type": "FILE",
        "status": "synched",
        "size": 14435,
        "dataset_id": "dset-cm7ae4d77028n01l1cnapd5si"
    }
}
```


## OpenAPI

````yaml get /v2/team/datasets/{dataset_id}/datasources/{datasource_id}
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/datasets/{dataset_id}/datasources/{datasource_id}:
    get:
      tags:
        - Data source
      summary: Get data source
      description: Obtains information about the specified data source.
      parameters:
        - name: dataset_id
          in: path
          description: >-
            The ID of the dataset that contains the target data source.


            To check the datasets you have access to, call [GET
            /v2/team/datasets](/api-reference/v2/list-datasets).
          required: true
          schema:
            type: string
        - name: datasource_id
          in: path
          description: >-
            The ID of the target data source.


            To check data sources existing in a specified dataset, call [GET
            /v2/team/datasets/{id}/datasources](/api-reference/v2/list-data-sources).
          required: true
          schema:
            type: string
        - name: user_id
          in: query
          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: true
          schema:
            type: string
        - 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
      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:
                    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
                      size:
                        type: number
                        description: >-
                          The size of the data source, expressed in bytes. The
                          value is in the `bigint` type. It can be null.
                    description: A data source object.
                    required:
                      - id
                      - dataset_id
                      - name
                      - type
                      - status
                required:
                  - data
                  - code
              example:
                code: 0
                data:
                  id: ds-cm7aedl58000501fc52hjj5c3
                  name: ds1.xlsx
                  type: FILE
                  status: synched
                  size: 14435
                  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:
  securitySchemes:
    apikey-header-x-pd-api-key:
      type: apiKey
      in: header
      name: x-pd-api-key

````