POST
/
v1
/
team
/
datasets
/
{datasetId}
/
datasources

Authorizations

x-pd-api-key
string
header
required

Headers

x-pd-external-trace-id
string

The external trace ID. The length ranges from 0 to 128 characters.

Path Parameters

datasetId
string
required

The dataset ID.

Query Parameters

userId
string
required

Your user ID.

How to obtain your user ID: Sign in to Powerdrill Enterprise, click Users in the top navigation bar, and find your user ID in the list of users.

Body

application/json
fileName
string
required

The file name, preferably including the file extension.

type
string
required

The type of the data source. Set it to FILE.

userId
string
required

Your user ID.

How to obtain your user ID: Sign in to Powerdrill Enterprise, click Users in the top navigation bar, and find your user ID in the list of users.

fileKey
string

The object storage path to your locally uploaded file.

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

Each time you upload a file through the Upload file endpoint, its fileKey is returned. For more details, see How to Upload Local Files.

You must specify either url or fileKey, but not both.

name
string

The name of the data source. If not provided, it will default to the value of fileName.

url
string

The URL of the file for public access.

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

You must specify either url or fileKey, but not both.

Response

200 - application/json
code
integer
required

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
object
required

The returned data object.