POST
/
v2
/
team
/
datasources

Authorizations

x-pd-api-key
string
header
required

Headers

x-pd-external-trace-id
string

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.

Body

application/json
name
string
required

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

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

user_id
string
required

Your user ID, which uniquely identifies you within your team. To obtain your ID:

url
string

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, .ppt, .doc, .docx, .xls, or .xlsx.

file_object_key
string

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, .ppt, .doc, .docx, .xls, or .xlsx.

How to obtain:

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

Response

200 - application/json
code
integer
required

Status code. 0 indicates that the operation is successful. Otherwise, the operation fails. For error troubleshooting, refer to Error Codes.

data
object
required

A data source object.