Export Dashboard model

This endpoint export a Dashboard model.

Request

A dashboard's model comes in handy when you want to duplicate a dashboard exactly as is. You first export it, then import it using the import model endpoint (next section).

To export a Dashboard's model make a GET request to the following URL:

HTTP MethodURL
GEThttps://industrial.api.ubidots.com/api/v2.0/dashboards/<dashboard_key>/_/export_models

Path Parameters

ParameterTypeDescription
<dashboard_key>StringThe id or label of the Dashboard, label should use the prefix ~

Header

ParameterRequired?Description
X-Auth-HeaderYesAuthentication Token of account
$ curl -X GET 'https://industrial.api.ubidots.com/api/v2.0/dashboards/<dashboard_key>/_/export_models' \
 -H 'X-Auth-Token: oaXBo6ODhIjPsusNRPUGIK4d72bc73'

[
    {
        "__model__": "dashboard",
        "label": "demo",
        "name": "Demo",
        "description": "",
        "tags": [],
        "context": {},
        "timeframe": {
            "endDate": "now",
            "startDate": "now-24h"
        },
        "isEditable": true,
        "order": 1
    },
    {
        "__model__": "widget",
        "name": "Demo Widget",
        "position": {},
        "layer": "6778369a7ca5cf67a4113ce1",
        "type": "metric",
        "settings": {},
        "uxSettings": {}
    },
    {
        "__model__": "layer",
        "name": "Demo Layer",
        "settings": {},
        "layer": "6778369a7ca5cf67a4113ce1",
        "position": {},
    }
]
{
    "code": 400001,
    "message": "Validation Error.",
    "detail": {
        ....
    }
}
{
    "code": 401001,
    "message": "Authentication credentials were not provided.",
    "detail": "Authentication credentials were not provided."
}