Export¶
GET /api/v1/dashboards/{dashboard_uuid}/export
Overview¶
Export the specified dashboard as a portable template object.
Before Calling and Usage Steps¶
After a successful read, save content from the response; it can be used as templateInfo for creation or import. To confirm the target dashboard locally, first verify its UUID by using the list or details. Export removes the original workspace's default query space and site configuration; after migration, reconfigure them in the target workspace.
Path Parameters¶
| Parameter | Type | Required | Description |
|---|---|---|---|
| dashboard_uuid | string | Y | UUID of the target dashboard. Example: dsbd_exampleHow to obtain or enter: Copy content.data[].uuid from the Dashboard List, or use content.uuid from the creation result. |
Request Headers¶
| Parameter | Type | Required | Description |
|---|---|---|---|
| DF-API-KEY | string | Y | OpenAPI authentication credential for the workspace. Example: <DF-API-KEY>How to obtain or enter: Obtain an OpenAPI Key with permission for this operation from API Key Management in the target workspace. |
Query Parameters¶
| Parameter | Type | Required | Description |
|---|---|---|---|
| title | string | Optional. Changes only the exported template title; if omitted, the source title is retained. Example: Production Inspection TemplateHow to obtain or enter: Enter the title to save in the exported template as needed. |
Additional Parameter Notes¶
This API returns a JSON object. Use content as the template body for transfer.
Request Example¶
curl --get 'https://openapi.guance.com/api/v1/dashboards/dsbd_example/export' \
-H 'DF-API-KEY: <DF-API-KEY>'
Response¶
HTTP 200, application/json. The example below shows the main fields that can be read directly.
| Field | Type | Description |
|---|---|---|
| content.title | string | Template name. Uses this value when the title Query parameter is provided. |
| content.summary | string | Template description. |
| content.identifier | string | Custom identifier of the dashboard. |
| content.dashboardType | string | Dashboard type. |
| content.dashboardOwnerType | string | Owner type of the original dashboard. |
| content.dashboardExtend | object | Portable extension information. The default query space and target site must be reconfigured after import. |
| content.dashboardMapping | array<object> |
Field mapping list. |
| content.dashboardBindSet | array | Associated binding configurations. |
| content.iconSet | object | Dashboard icon information. |
| content.thumbnail | string | Thumbnail field. |
| content.tagInfo | array<object> |
Tags associated with the template. |
| content.main | object | Charts, variables, and chart groups in the template. |
| content.main.type | string | For exported templates, this is fixed to template. |
| content.main.charts | array<object> |
Template chart definitions. |
| content.main.vars | array<object> |
View variable definitions. |
| content.main.groups | array<object> |
Chart group definitions. |
| content.main.groups[].name | string | Chart group name. |
| content.main.groups[].extend | object | Extension settings for the chart group. |
| content.main.chartGroupPos | array<string> |
Sort order records for chart groups. |
| content.declaration | object or null | Workspace public declaration. |
{
"code": 200,
"content": {
"title": "Production Inspection",
"summary": "Production service inspection metrics",
"identifier": "prod-check",
"dashboardType": "CUSTOM",
"dashboardExtend": {},
"dashboardMapping": [],
"iconSet": {},
"dashboardBindSet": [],
"main": {
"type": "template",
"charts": [],
"vars": [],
"chartGroupPos": [],
"groups": []
},
"dashboardOwnerType": "node",
"thumbnail": "",
"tagInfo": [],
"declaration": {}
},
"errorCode": "",
"message": "",
"success": true,
"traceId": "TRACE-EXAMPLE"
}
Error Responses¶
For authentication, rate limiting, and common request errors, see Common Error Definitions.
If no active dashboard is found in the current workspace, HTTP 200 and an empty object may be returned. If a non-empty title is also provided, the result may contain only the exported title and common response fields. Before using the template, check whether it contains main.
| HTTP Status | errorCode | Trigger Condition | Message or Response Description | Resolution |
|---|---|---|---|---|
| 406 | ft.InvalidParameter | The historical chart query structure is invalid, and the dashboard cannot be exported as a valid template. | Invalid parameter {} |
Check the original view's chart configuration against the field path in the error, correct it, and export again. |