Skip to main content
POST
/
project
/
{project_id}
/
chart
/
{id}
/
chart-dataset-config
cURL
curl --request POST \
  --url https://api.chartbrew.com/project/{project_id}/chart/{id}/chart-dataset-config \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "chart_id": 123,
  "dataset_id": 123,
  "xAxis": "<string>",
  "xAxisOperation": "<string>",
  "yAxis": "<string>",
  "yAxisOperation": "<string>",
  "dateField": "<string>",
  "dateFormat": "<string>",
  "conditions": [
    {
      "id": "<string>",
      "field": "<string>",
      "operator": "is",
      "value": "<string>",
      "displayValues": true
    }
  ],
  "formula": "<string>",
  "datasetColor": "<string>",
  "fillColor": "<string>",
  "fill": false,
  "multiFill": false,
  "legend": "<string>",
  "pointRadius": 123,
  "excludedFields": [
    "<string>"
  ],
  "sort": "<string>",
  "columnsOrder": [
    "<string>"
  ],
  "order": 0,
  "maxRecords": 123,
  "goal": 123,
  "configuration": {
    "variables": [
      {
        "name": "<string>",
        "value": "<string>"
      }
    ]
  }
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "chart_id": 123,
  "dataset_id": 123,
  "xAxis": "<string>",
  "xAxisOperation": "<string>",
  "yAxis": "<string>",
  "yAxisOperation": "<string>",
  "dateField": "<string>",
  "dateFormat": "<string>",
  "conditions": [
    {
      "id": "<string>",
      "field": "<string>",
      "operator": "is",
      "value": "<string>",
      "displayValues": true
    }
  ],
  "formula": "<string>",
  "datasetColor": "<string>",
  "fillColor": "<string>",
  "fill": false,
  "multiFill": false,
  "legend": "<string>",
  "pointRadius": 123,
  "excludedFields": [
    "<string>"
  ],
  "sort": "<string>",
  "columnsOrder": [
    "<string>"
  ],
  "order": 0,
  "maxRecords": 123,
  "goal": 123,
  "configuration": {
    "variables": [
      {
        "name": "<string>",
        "value": "<string>"
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

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

Path Parameters

project_id
string
required

ID of the project

id
string
required

ID of the chart

Body

application/json
id
string<uuid>
chart_id
integer
dataset_id
integer
xAxis
string

Chart-specific x-axis or dimension field using traversal syntax - root[].field

xAxisOperation
string

Chart-specific x-axis operation

yAxis
string

Chart-specific y-axis or metric field using traversal syntax - root[].field

yAxisOperation
string

Chart-specific operation to perform on the y-axis - none, sum, avg, min, max, count

dateField
string

Chart-specific date field using traversal syntax. Specifies which field should be used for date filtering.

dateFormat
string

Chart-specific date format to use for date filtering. e.g YYYY-MM-DD

conditions
object[]

Chart-specific conditions layered on top of the dataset

formula
string
datasetColor
string
fillColor
string
fill
boolean
default:false
multiFill
boolean
default:false
legend
string
pointRadius
integer
excludedFields
string[]
sort
string
columnsOrder
string[]
order
integer
default:0
maxRecords
integer
goal
integer
configuration
object

Additional configuration options for the dataset. Currently used to give values to variables.

Response

Created chart dataset configuration

id
string<uuid>
chart_id
integer
dataset_id
integer
xAxis
string

Chart-specific x-axis or dimension field using traversal syntax - root[].field

xAxisOperation
string

Chart-specific x-axis operation

yAxis
string

Chart-specific y-axis or metric field using traversal syntax - root[].field

yAxisOperation
string

Chart-specific operation to perform on the y-axis - none, sum, avg, min, max, count

dateField
string

Chart-specific date field using traversal syntax. Specifies which field should be used for date filtering.

dateFormat
string

Chart-specific date format to use for date filtering. e.g YYYY-MM-DD

conditions
object[]

Chart-specific conditions layered on top of the dataset

formula
string
datasetColor
string
fillColor
string
fill
boolean
default:false
multiFill
boolean
default:false
legend
string
pointRadius
integer
excludedFields
string[]
sort
string
columnsOrder
string[]
order
integer
default:0
maxRecords
integer
goal
integer
configuration
object

Additional configuration options for the dataset. Currently used to give values to variables.