- Shopping
- Authorization
- Flights
- Destination experiences
- Car and Transfers
- Market insights
- Hotels
- Itinerary management
- STARGAME
- Common errors
- InitialGetBalance
- InitialGetBalance
- GetBalanceBadHash
- GetBalanceBadHash
- InvalidCommand
- InvalidCommand
- InvalidUserName
- InvalidUserName
- PlayerBetMissingTransactionId
- PlayerBetMissingTransactionId
- PlayerWinEmptyTransactionId
- PlayerWinEmptyTransactionId
- PlayerBetNegativeAmount
- PlayerBetNegativeAmount
- PlayerWinNegativeAmount
- PlayerWinNegativeAmount
- PlayerBetInsufficientBalance
- PlayerBetInsufficientBalance
- CheckBalance
- CheckBalance
- Workflow
- OpenSession
- OpenSession
- OpenSessionAlreadyOpened
- OpenSessionAlreadyOpened
- GetBalance
- GetBalance
- PlayerBet #1 (-50)
- PlayerBet #1 (-50)
- PlayerWin (+150)
- PlayerWin (+150)
- PlayerBet #2 (-50)
- PlayerBet #2 (-50)
- PlayerWinZeroAmount (+0)
- PlayerWinZeroAmount (+0)
- PlayerBet #3 (-50)
- PlayerBet #3 (-50)
- PlayerWin (+200)
- PlayerWin (+200)
- PlayerWinTransactionAlreadyExist
- PlayerWinTransactionAlreadyExist
- PlayerBet #4 (-200)
- PlayerBet #4 (-200)
- PlayerBetTransactionAlreadyExist
- PlayerBetTransactionAlreadyExist
- PlayerBetBadHash
- PlayerBetBadHash
- PlayerWinBadHash
- PlayerWinBadHash
- CancelBet #4 (+200)
- CancelBet #4 (+200)
- CancelBetAlreadyCancelled
- CancelBetAlreadyCancelled
- CancelBetDoesNotExist
- CancelBetDoesNotExist
- PlayerBet #5 (-50)
- PlayerBet #5 (-50)
- CloseSession
- CloseSession
- PlayerBet #6 (-250)
- PlayerBet #6 (-250)
- PlayerWin (+50)
- PlayerWin (+50)
- CancelBet #5 (+50)
- CancelBet #5 (+50)
- PlayerBet #7 (-100)
- PlayerBet #7 (-100)
- PlayerBet #8 (-50)
- PlayerBet #8 (-50)
- PlayerBet #9 (-25)
- PlayerBet #9 (-25)
- PlayerBet #10 (-25)
- PlayerBet #10 (-25)
- PlayerBet #11 (-50)
- PlayerBet #11 (-50)
- CancelBet #7 (+100)
- CancelBet #7 (+100)
- CancelBet #9 (+25)
- CancelBet #9 (+25)
- CancelBet #11 (+50)
- CancelBet #11 (+50)
- PlayerWin (+75)
- PlayerWin (+75)
- CloseSessionAlreadyClosed
- CloseSessionAlreadyClosed
- FinalCheckBalance
- FinalCheckBalance
- RemoteSession
- Common errors
- IMEI
- GPK
- SUPERSET
- Menu
- Queries
- Annotation Layers
- /annotation_layer/
- /annotation_layer/
- /annotation_layer/
- /annotation_layer/_info
- /annotation_layer/related/{column_name}
- /annotation_layer/{pk}
- /annotation_layer/{pk}
- /annotation_layer/{pk}
- /annotation_layer/{pk}/annotation/
- /annotation_layer/{pk}/annotation/
- /annotation_layer/{pk}/annotation/
- /annotation_layer/{pk}/annotation/{annotation_id}
- /annotation_layer/{pk}/annotation/{annotation_id}
- /annotation_layer/{pk}/annotation/{annotation_id}
- AsyncEventsRestApi
- CacheRestApi
- Charts
- CSS Templates
- Dashboards
- Database
- /database/
- /database/
- /database/_info
- /database/export/
- /database/import/
- /database/test_connection
- /database/{pk}
- /database/{pk}
- /database/{pk}
- /database/{pk}/function_names/
- /database/{pk}/related_objects/
- /database/{pk}/schemas/
- /database/{pk}/select_star/{table_name}/
- /database/{pk}/select_star/{table_name}/{schema_name}/
- /database/{pk}/table/{table_name}/{schema_name}/
- Datasets
- LogRestApi
- OpenApi
- Security
- VEGAS
- BI
- vl
- Vegaslounge
- VL
- VegasloungeAPI
/chart/data
POST
/chart/data
Charts
Request
Body Params application/json
datasource
object (ChartDataDatasource)
optional
id
integer <int32>
required
type
enum<string>
optional
Allowed values:
druidtable
force
boolean
optional
false
queries
array[object (ChartDataQueryObject) {27}]
optional
annotation_layers
array[object (AnnotationLayer) {16}] | null
optional
applied_time_extras
object | null
optional
Example:
{"__time_range":"1 year ago : now"}
columns
array[string] | null
optional
datasource
null | allOf {1}
optional
druid_time_origin
string | null
optional
extras
as druid_time_origin
.extras
null | allOf {1}
optional
filters
array[object (ChartDataFilter) {3}] | null
optional
granularity
string | null
optional
granularity_sqla
string | null
optional
granularity
instead.groupby
array[string] | null
optional
having
string | null
optional
extras
.having_filters
array[object (ChartDataFilter) {3}] | null
optional
extras
as having_druid
.is_rowcount
boolean | null
optional
is_timeseries
boolean | null
optional
query_object
a timeseries.metrics
array | null
optional
ChartDataAdhocMetricSchema
for the structure of ad-hoc metrics.order_desc
boolean | null
optional
false
orderby
array [array] | null
optional
Example:
[["my_col_1",false],["my_col_2",true]]
post_processing
array [null] | null
optional
result_type
null
optional
row_limit
integer <int32> | null
optional
config["ROW_LIMIT"]
>= 0
row_offset
integer <int32> | null
optional
0
>= 0
time_range
string | null
optional
since : until
or human readable freeform. Valid formats for since
and until
are:Example:
Last week
time_shift
string | null
optional
timeseries_limit
integer <int32> | null
optional
0
timeseries_limit_metric
null
optional
url_params
object | null
optional
where
string | null
optional
extras
.result_format
optional
result_type
optional
Example
{
"datasource": {
"id": 0,
"type": "druid"
},
"force": true,
"queries": [
{
"annotation_layers": [
{
"annotationType": "FORMULA",
"color": "string",
"descriptionColumns": [
"string"
],
"hideLine": true,
"intervalEndColumn": "string",
"name": "string",
"opacity": "",
"overrides": {
"property1": null,
"property2": null
},
"show": true,
"showMarkers": true,
"sourceType": "",
"style": "dashed",
"timeColumn": "string",
"titleColumn": "string",
"value": null,
"width": 0
}
],
"applied_time_extras": {
"__time_range": "1 year ago : now"
},
"columns": [
"string"
],
"datasource": {
"id": 0,
"type": "druid"
},
"druid_time_origin": "string",
"extras": {
"druid_time_origin": "string",
"having": "string",
"having_druid": [
{
"col": "country",
"op": "==",
"val": [
"China",
"France",
"Japan"
]
}
],
"relative_end": "today",
"relative_start": "today",
"time_grain_sqla": "PT1S",
"time_range_endpoints": [
"unknown"
],
"where": "string"
},
"filters": [
{
"col": "country",
"op": "==",
"val": [
"China",
"France",
"Japan"
]
}
],
"granularity": "string",
"granularity_sqla": "string",
"groupby": [
"string"
],
"having": "string",
"having_filters": [
{
"col": "country",
"op": "==",
"val": [
"China",
"France",
"Japan"
]
}
],
"is_rowcount": true,
"is_timeseries": true,
"metrics": [
null
],
"order_desc": true,
"orderby": [
[
"my_col_1",
false
],
[
"my_col_2",
true
]
],
"post_processing": [
{
"operation": "aggregate",
"options": {
"aggregates": {
"age_mean": {
"column": "age",
"operator": "mean"
},
"age_q1": {
"column": "age",
"operator": "percentile",
"options": {
"q": 0.25
}
}
},
"groupby": [
"country",
"gender"
]
}
}
],
"result_type": null,
"row_limit": 0,
"row_offset": 0,
"time_range": "Last week",
"time_shift": "string",
"timeseries_limit": 0,
"timeseries_limit_metric": null,
"url_params": {
"property1": "string",
"property2": "string"
},
"where": "string"
}
],
"result_format": null,
"result_type": null
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/chart/data' \
--header 'Content-Type: application/json' \
--data-raw '{
"datasource": {
"id": 0,
"type": "druid"
},
"force": true,
"queries": [
{
"annotation_layers": [
{
"annotationType": "FORMULA",
"color": "string",
"descriptionColumns": [
"string"
],
"hideLine": true,
"intervalEndColumn": "string",
"name": "string",
"opacity": "",
"overrides": {
"property1": null,
"property2": null
},
"show": true,
"showMarkers": true,
"sourceType": "",
"style": "dashed",
"timeColumn": "string",
"titleColumn": "string",
"value": null,
"width": 0
}
],
"applied_time_extras": {
"__time_range": "1 year ago : now"
},
"columns": [
"string"
],
"datasource": {
"id": 0,
"type": "druid"
},
"druid_time_origin": "string",
"extras": {
"druid_time_origin": "string",
"having": "string",
"having_druid": [
{
"col": "country",
"op": "==",
"val": [
"China",
"France",
"Japan"
]
}
],
"relative_end": "today",
"relative_start": "today",
"time_grain_sqla": "PT1S",
"time_range_endpoints": [
"unknown"
],
"where": "string"
},
"filters": [
{
"col": "country",
"op": "==",
"val": [
"China",
"France",
"Japan"
]
}
],
"granularity": "string",
"granularity_sqla": "string",
"groupby": [
"string"
],
"having": "string",
"having_filters": [
{
"col": "country",
"op": "==",
"val": [
"China",
"France",
"Japan"
]
}
],
"is_rowcount": true,
"is_timeseries": true,
"metrics": [
null
],
"order_desc": true,
"orderby": [
[
"my_col_1",
false
],
[
"my_col_2",
true
]
],
"post_processing": [
{
"operation": "aggregate",
"options": {
"aggregates": {
"age_mean": {
"column": "age",
"operator": "mean"
},
"age_q1": {
"column": "age",
"operator": "percentile",
"options": {
"q": 0.25
}
}
},
"groupby": [
"country",
"gender"
]
}
}
],
"result_type": null,
"row_limit": 0,
"row_offset": 0,
"time_range": "Last week",
"time_shift": "string",
"timeseries_limit": 0,
"timeseries_limit_metric": null,
"url_params": {
"property1": "string",
"property2": "string"
},
"where": "string"
}
],
"result_format": null,
"result_type": null
}'
Responses
🟢200OK
application/json
Body
result
array[object (ChartDataResponseResult) {13}]
optional
annotation_data
array [object {1}] | null
optional
applied_filters
array [object]
optional
cache_key
string | null
required
cache_timeout
integer <int32> | null
required
cached_dttm
string | null
required
data
array [object]
optional
error
string | null
optional
is_cached
boolean
required
query
string
required
rejected_filters
array [object]
optional
rowcount
integer <int32>
optional
stacktrace
string | null
optional
status
enum<string>
optional
Allowed values:
stoppedfailedpendingrunningscheduledsuccesstimed_out
Example
{
"result": [
{
"annotation_data": [
{
"property1": "string",
"property2": "string"
}
],
"applied_filters": [
{}
],
"cache_key": "string",
"cache_timeout": 0,
"cached_dttm": "string",
"data": [
{}
],
"error": "string",
"is_cached": true,
"query": "string",
"rejected_filters": [
{}
],
"rowcount": 0,
"stacktrace": "string",
"status": "stopped"
}
]
}
🟢202Accepted
🟠400Bad Request
🟠401Unauthorized
🔴500Server Error