🚧 [Experimental] Get chart data
Runs a saved Wizard, QL, or Editor chart with the supplied parameters and returns flat tables. Pivot tables are not supported. Editor charts require Editor.setRawData(). Large integers in Wizard results may lose precision. Limits across all results: 100000 rows, 100000 cells, 1000 tables and 100000 schema columns; up to 800 columns per table. Exceeding a limit returns HTTP 422; results are not truncated.
Request
POST
https://api.datalens.tech/rpc/getChartData
Headers
|
Name |
Description |
|
x-dl-api-version |
Type: string API version header. Const: Example: |
Body
application/json
{
"chartId": "example",
"params": {}
}
|
Name |
Description |
||
|
chartId |
Type: string Saved chart ID. Min length: Example: |
||
|
params |
Type: object
Chart parameters, including table pagination. Saved chart settings apply. Example
|
Responses
200 OK
Response
Body
application/json
{
"chartType": "wizard",
"results": [
{
"schema": [
{}
],
"rows": [
[
null
]
]
}
]
}
One of 3 types
-
Type: GetWizardChartDataResult
Example
{ "chartType": "wizard", "results": [ { "schema": [ { "name": "example", "guid": "example", "type": "date" } ], "rows": [ [ null ] ] } ] } -
Type: GetQLChartDataResult
Example
{ "chartType": "ql", "results": [ { "schema": [ { "name": "example", "type": "example" } ], "rows": [ [ null ] ] } ] } -
Type: GetEditorChartDataResult
Example
{ "chartType": "editor", "results": [ { "schema": [ { "name": "example" } ], "rows": [ [ null ] ] } ] }
GetWizardChartDataResult
|
Name |
Description |
||||||||||
|
chartType |
Type: string Const: Example: |
||||||||||
|
results |
Type: object[]
Tables in query and block order. Results with different schemas are returned separately. Example
|
Example
{
"chartType": "wizard",
"results": [
{
"schema": [
{
"name": "example",
"guid": "example",
"type": "date"
}
],
"rows": [
[
null
]
]
}
]
}
GetQLChartDataResult
|
Name |
Description |
||||||||
|
chartType |
Type: string Const: Example: |
||||||||
|
results |
Type: object[]
Tables in query and block order. Results with different schemas are returned separately. Example
|
Example
{
"chartType": "ql",
"results": [
{
"schema": [
{
"name": "example",
"type": "example"
}
],
"rows": [
[
null
]
]
}
]
}
GetEditorChartDataResult
|
Name |
Description |
||||||
|
chartType |
Type: string Const: Example: |
||||||
|
results |
Type: object[]
Tables in query and block order. Results with different schemas are returned separately. Example
|
Example
{
"chartType": "editor",
"results": [
{
"schema": [
{
"name": "example"
}
],
"rows": [
[
null
]
]
}
]
}