Import Dashboard model

This endpoint creates a new Dashboard from a previouslly export dashboard

Request

To create a new Dashboard please make a POST request to the following URL:

HTTP MethodURL
POSThttps://industrial.api.ubidots.com/api/v2.0/dashboards/_/import_models

Query Parameters

ParameterTypeUseDescription
tokenStringAuthenticationAuthentication Token can optionally be sent as a query parameter. (Not recommended)

Body Parameters

The request body that this endpoint expects is exactly the JSON output from the Export Dashboard model endpoint.

Header

ParameterTypeDescription
X-Auth-TokenStringAuthentication Token of account
Content-TypeString (application/json)Content type of body
curl -X POST 'https://industrial.api.ubidots.com/api/v2.0/dashboards/' \
 -H 'Content-Type: application/json' \
 -H 'X-Auth-Token: oaXBo6ODhIjPsusNRPUGIK4d72bc73' \
 -d '<PUT_THE_JSON_OUTOUT_FROM_THE_EXPORT_ENDPOINT_HERE>'
{
    "url": "https://industrial.api.ubidots.com/api/v2.0/dashboards/abcdefghi1234567890",
    "id": "abcdefghi1234567890",
    "organization": null,
    "label": "the_dashboard",
    "name": "The Dashboard",
    "description": "The Dashboard Description",
    "timeframe": {
        "startDate": "now-24h",
        "endDate": "now"
    },
    "tags": [
        "data",
        "visualization"
    ],
    "context": {
        "size": null,
        "_isNew": true,
        "isDynamic": true,
        "displayName": "The Dashboard",
        "__customStyle": {
            "dashboard": {
                "color": "#5e5e5e",
                "backgroundColor": "#f2f2f2"
            },
            "contextBar": {
                "color": "#ffffff",
                "title": {
                    "fontSize": 30,
                    "fontFamily": "Helvetica",
                    "fontWeight": "bold"
                },
                "fontSize": 14,
                "fontFamily": "Helvetica",
                "boxShadow": "3px 3px 5px 6px #ccc",
                "borderRadius": "0px 0px 7px 7px",
                "backgroundColor": "#192c54"
            }
        },
        "defaultDevice": null,
        "hasBackground": false,
        "widgetsOpacity": 2,
        "floatingWidgets": true,
        "timestampFormat": "MM/DD/YYYY HH:mm",
        "deviceFilterType": "all",
        "widgetVerticalSpacing": 10,
        "widgetHorizontalSpacing": 10
    },
    "isEditable": true,
    "order": 1,
    "widgets": "https://industrial.api.ubidots.com/api/v2.0/dashboards/abcdefghijkl1234567890/widgets",
    "isActive": true,
    "createdAt": "2020-07-21T19:28:20.411087Z"
}
{
    "code": 400001,
    "message": "Validation Error.",
    "detail": {
        ....
    }
}
{
    "code": 401001,
    "message": "Authentication credentials were not provided.",
    "detail": "Authentication credentials were not provided."
}

Response

Returns an Dashboard object of the Dashboard created.