POST
/
team
/
{team_id}
/
datasets
curl --request POST \
  --url https://api.chartbrew.com/team/{team_id}/datasets \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "team_id": 123,
  "project_ids": [
    123
  ],
  "name": "<string>",
  "connection_id": 123,
  "type": "<string>",
  "query": "<string>",
  "datasetColor": "<string>",
  "dateField": "<string>",
  "dateFormat": "<string>",
  "legend": "<string>",
  "configuration": {}
}'
{
  "id": 123,
  "team_id": 123,
  "project_ids": [
    123
  ],
  "chart_id": 123,
  "connection_id": 123,
  "draft": true,
  "query": "<string>",
  "xAxis": "<string>",
  "xAxisOperation": "<string>",
  "yAxis": "<string>",
  "yAxisOperation": "none",
  "dateField": "<string>",
  "dateFormat": "<string>",
  "legend": "<string>",
  "fieldsSchema": {},
  "excludedFields": [
    "<string>"
  ],
  "configuration": {},
  "joinSettings": {
    "joins": [
      {
        "dr_id": 123,
        "join_id": 123,
        "dr_field": "<string>",
        "join_field": "<string>"
      }
    ]
  }
}

To start fetching data in a dataset, you need to create a data request. A data request is responsible with using your connections to fetch data from your data sources. You can create a data request by using the Create a Data Request endpoint.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

team_id
string
required

ID of the team

Body

application/json

Response

200
application/json

Created dataset

The response is of type object.