🚧 [Experimental] Get chart screenshot
Renders the specified chart and returns the screenshot data.
Request
POST
https://api.datalens.tech/rpc/getChartScreenshot
Headers
|
Name |
Description |
|
x-dl-api-version |
Type: string API version header. Const: Example: |
Body
application/json
{
"type": "png",
"base64": true,
"s3": true,
"width": 0.1,
"height": 0.1,
"fullPage": true,
"queryParams": {},
"chartId": "example"
}
|
Name |
Description |
||
|
chartId |
Type: string ID of the chart to capture. Example: |
||
|
base64 |
Type: boolean Whether to return the file as a base64 string. |
||
|
fullPage |
Type: boolean Whether to capture the full page. |
||
|
height |
Type: number Viewport height in pixels. Max value: Exclusive min: |
||
|
queryParams |
Type: object
Additional query parameters of the captured page, for example chart or dashboard parameters. Example
|
||
|
s3 |
Type: boolean Whether to upload the file to S3. Defaults to true unless base64 is enabled. |
||
|
type |
Type: string Output file format. Defaults to png. Enum: |
||
|
width |
Type: number Viewport width in pixels. Max value: Exclusive min: |
Responses
200 OK
Response
Body
application/json
{
"data": "example"
}
|
Name |
Description |
|
data |
Type: string URL of the uploaded file or its base64 representation. Example: |