Export¶
GET /api/v1/dashboard/{dashboard_uuid}/export
Overview¶
Export the specified Built-in View as a JSON template.
Prerequisites and Usage Steps¶
Select an active Built-in View from the Built-in View List. Save the content in the response; you can pass it to templateInfos when creating. The export removes the default query workspace and target site information; reconfigure them after migration. The exported template does not include dashboardBidding; save the binding separately from Built-in View Details.
Route Parameters¶
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| dashboard_uuid | string | Y | UUID of the Built-in View in the current workspace. Example: dsbd_inner_exampleHow to obtain or enter: Obtain from content.data[].uuid in the Built-in View List, or use content.uuid from the create response. |
Request Headers¶
| Parameter Name | 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 this operation permission from API Key Management in the target workspace. |
Query Request Parameters¶
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| title | string | Overrides the template title without changing the original view name. Null allowed: False Example: Inspection TemplateHow to obtain or enter: Enter the display title required for the exported file, or omit it to use the view name. |
Additional Parameter Notes¶
Use the returned JSON object to migrate charts, layouts, groups, and variables. Verify bindings for external data sources in different workspaces.
Request Example¶
curl --get 'https://openapi.guance.com/api/v1/dashboard/dsbd_inner_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; the title Query parameter can override only the export result. |
| content.summary | string | Template description. |
| content.identifier | string | Custom identifier. |
| content.dashboardType | string | Saved Built-in View type. |
| content.dashboardOwnerType | string | Resource ownership of the source view. |
| content.dashboardExtend | object | Portable extended configuration. |
| content.dashboardMapping | array<object> |
Variable field mapping. |
| content.dashboardBindSet | array | View binding configuration. |
| content.iconSet | object | Icon configuration. |
| content.thumbnail | string | Thumbnail field. |
| content.tagInfo | array<object> |
Tags associated with the template. |
| content.tagInfo[].name | string | Template tag name. |
| content.main | object | Charts, variables, and groups in the template. |
| content.main.type | string | Fixed to template. |
| content.main.vars | array<object> |
Array of variable definitions. |
| content.main.vars[].name | string | Variable name. |
| content.main.vars[].type | string | Variable type. |
| content.main.vars[].definition | object | Variable definition; contents vary by type. |
| content.main.vars[].seq | integer | Variable order. |
| content.main.vars[].code | string | Variable code used to reference the variable. |
| content.main.vars[].datasource | string | Data source of the variable. |
| content.main.vars[].valueSort | string | Sorting method for variable values. |
| content.main.vars[].hide | integer | Setting for hiding the variable. |
| content.main.vars[].isHiddenAsterisk | integer | Setting for the hidden asterisk option. |
| content.main.vars[].multiple | boolean | Whether multiple selection is allowed. |
| content.main.vars[].includeStar | boolean | Whether to include the asterisk option. |
| content.main.vars[].extend | object | Extended settings for the variable. |
| content.main.charts | array<object> |
Array of chart definitions. Import recreates chart UUIDs. |
| content.main.charts[].uuid | string | Source chart UUID. |
| content.main.charts[].name | string | Chart name. |
| content.main.charts[].type | string | Chart type. |
| content.main.charts[].chartGroupUUID | string | Source chart group UUID. |
| content.main.charts[].group.name | string or null | Chart group name. |
| content.main.charts[].prevGroupName | string or null | Previous chart group name. |
| content.main.charts[].pos | object | Position and size of the chart in the layout. |
| content.main.charts[].queries | array<object> |
Chart query configuration. |
| content.main.charts[].extend | object | Display and interaction configuration for the chart. |
| content.main.groups | array<object> |
Array of group definitions. |
| content.main.groups[].name | string | Chart group name. |
| content.main.groups[].extend | object | Extended configuration for the chart group. |
| content.main.chartGroupPos | array<string> |
Chart group ordering identifiers. |
| content.declaration | object or null | Public declaration of the workspace. |
{
"code": 200,
"content": {
"title": "Host Details Built-in View",
"summary": "View running status by Host",
"identifier": "host-overview",
"dashboardType": "CUSTOM",
"dashboardExtend": {},
"dashboardMapping": [],
"dashboardBindSet": [],
"iconSet": {},
"main": {
"type": "template",
"charts": [],
"vars": [],
"groups": [],
"chartGroupPos": []
},
"dashboardOwnerType": "inner",
"tagInfo": [],
"thumbnail": "",
"declaration": {}
},
"errorCode": "",
"message": "",
"success": true,
"traceId": "TRACE-EXAMPLE"
}
Error Response¶
For authentication, rate limiting, and common request errors, see Common Error Definitions.
| HTTP Status | errorCode | Trigger Condition | Message or Response Description | Resolution |
|---|---|---|---|---|
| 406 | ft.ParameterValidationFailed | Uses an undeclared Query parameter or a parameter violates the rules | Parameter parsing failed | Check the Query parameter table and examples. |
| 404 | ft.NotFoundView | The target does not exist, has been deleted, or does not belong to this workspace | The specified view was not found | Obtain a still-valid UUID from the Built-in View List in the same workspace. |
| 403 | ft.ForbiddenOperationResource | The API Key does not have valid operation permissions for the target view | No operation permission | Confirm the workspace ownership and API Key permissions, or contact the resource creator. |
| 403 | ft.ForbiddenAccessResourceNoPublic | The identity accessing the private view differs from the identity that created the view | No resource access permission; the current page is not public | Perform the operation using the creator identity that has access, and confirm that the API Key is from the same workspace. |
| 406 | ft.InvalidParameter | The legacy chart query structure is invalid and cannot be exported as a valid template | Parameter {} is invalid |
Check the original view's chart configuration according to the field path in the error, correct it, and export again. |