🚧 [Experimental] Get dataset data
Returns up to limit rows from the specified dataset. If sort is omitted, neither the row order nor the subset selected by limit is guaranteed and may change between requests. Every field used in sort must also be included in columns. An offset greater than zero requires a non-empty sort. For stable pagination, sorting should define a total order; add tie-breaking fields when sort values may repeat.
Request
POST
https://api.datalens.tech/rpc/getDatasetData
Headers
|
Name |
Description |
|
x-dl-api-version |
Type: string API version header. Const: Example: |
Body
application/json
{
"datasetId": "example",
"workbookId": "example",
"columns": [
"example"
],
"filters": [
{
"guid": "example",
"operation": "in",
"values": [
"example"
]
}
],
"params": [
{
"guid": "example",
"value": "example"
}
],
"sort": [
{
"guid": "example",
"direction": "asc"
}
],
"limit": 1,
"offset": 0
}
|
Name |
Description |
||||||
|
columns |
Type: string[] Dataset field GUIDs to return. Min items: Example
|
||||||
|
datasetId |
Type: string Dataset ID. Min length: Example: |
||||||
|
filters |
Type: object[]
Filters to apply. Example
|
||||||
|
limit |
Type: integer Maximum number of rows to return. Defaults to 100. Without sort, the selected rows and their order are not guaranteed. Min value: Max value: |
||||||
|
offset |
Type: integer Number of rows to skip. Values greater than zero require a non-empty sort. Min value: |
||||||
|
params |
Type: object[]
Dataset parameter values. Example
|
||||||
|
sort |
Type: object[]
Sorting rules. Use a unique tie-breaking field to make pagination deterministic. Example
|
||||||
|
workbookId |
Type: string | null Workbook ID. Min length: Example: |
Responses
200 OK
Response
Body
application/json
{
"schema": [
{
"name": "example",
"guid": "example",
"type": "date"
}
],
"rows": [
[
null
]
]
}
|
Name |
Description |
||||||
|
rows |
Type: unknown[][] Rows with values ordered according to schema. Example
|
||||||
|
schema |
Type: object[]
Returned columns in row value order. Example
|