POST
/
v2
/
team
/
datasets
/
{id}
/
datasources
curl --request POST \
  --url https://ai.data.cloud/api/v2/team/datasets/{id}/datasources \
  --header 'Content-Type: application/json' \
  --header 'x-pd-api-key: <api-key>' \
  --data '{
  "name": "test.csv",
  "type": "FILE",
  "user_id": "tmm-dsfasdfasdfa",
  "url": "https://s3.amazonaws.com/powerdrilltest/user/clvl4cad2001q01l1m522hxlu/upload/f9773f1e-cd68-489a-8121-d566ca9218b1.csv?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20240924T143419Z&X-Amz-SignedHeaders=host&X-Amz-Expires=599&X-Amz-Credential=AKIARLSQLXURHEIDN4OZ%2F20240924%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=9ca0c58d508926a5811818041d557ffb53c64025dae94c0855280d457c7089a2"
}'
{
  "code": 0,
  "data": {
    "id": "datasource-cadsgfsdagasgadsg",
    "dataset_id": "dataset-dagasdgasgasg",
    "name": "test.csv",
    "type": "FILE",
    "status": "synching"
  }
}

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.

Path Parameters

id
string
required

The ID of the dataset in which you want to create a data source.

To check the datasets you have access to, call GET /v2/team/datasets.

Body

application/json

Response

200 - application/json

The response is of type object.