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

# Presign data source 

> Generates a presigned URL to access the specified data source.



## OpenAPI

````yaml post /v1/team/datasets/{datasetId}/datasources/{datasourceId}/presign
openapi: 3.0.1
info:
  title: Team Open API
  description: ''
  version: 1.0.0
servers:
  - url: https://ai.data.cloud/api
    description: 体验环境
security: []
tags:
  - name: Session
  - name: Dataset
  - name: Data source
  - name: File
  - name: Job
paths:
  /v1/team/datasets/{datasetId}/datasources/{datasourceId}/presign:
    post:
      tags:
        - Data source
      summary: 'Presign data source '
      description: Generates a presigned URL to access the specified data source.
      parameters:
        - name: datasetId
          in: path
          description: The ID of the dataset that contains the target data source.
          required: true
          schema:
            type: string
        - name: datasourceId
          in: path
          description: The data source ID.
          required: true
          schema:
            type: string
        - name: x-pd-external-trace-id
          in: header
          description: The external trace ID. The length ranges from 0 to 128 characters.
          required: false
          example: ''
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                expireIn:
                  type: integer
                  description: >-
                    The duration after which the presigned URL will expire. The
                    value is expressed in seconds. The minimum value is `1` and
                    is default to `600`.
                  default: 600
                  minimum: 60
            example:
              expireIn: 600
      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. Possible error
                      codes include: 

                      - 100: Bad request. 

                      - 201: Request frequency limit.

                      - 9999: Internal error. 

                      - 100001: Invalid operation. 
                  data:
                    type: object
                    properties:
                      presignedUrl:
                        type: string
                        description: The presigned URL to access the data source.
                      expireAt:
                        type: string
                        format: date-time
                        description: The expiration date and time of the presigned URL.
                    required:
                      - presignedUrl
                      - expireAt
                    description: The returned data object.
                required:
                  - data
                  - code
              examples:
                '1':
                  summary: Success example
                  value:
                    code: 0
                    data:
                      presignedUrl: string
                      expireAt: '2024-11-13T14:15:22.123Z'
          headers:
            x-pd-trace-id:
              example: ''
              required: true
              description: The trace ID of Powerdrill.
              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

````