Create a Dashboard Using Data from AnythingDB
- From the left menu, click Real Time Visualization > Workbooks.
- Select the desired folder. By default, a root folder with your username is present.
-
Click New Workbook.
-
Create a Data Table by clicking the + icon. Data tables define the queries and
source data repository definitions to retrieve data.
Figure 1. - Under Data Table Settings, enter a title and click the check mark to save it. Enter a description, if desired.
- With Data Sources highlighted, under File/URL, select SmartWorks IoT.
-
Enter the following:
- Client ID: from the App created in Create an App.
- Client Secret: from the App created in Create an App.
- Grant Type: type of App created in Create an App. In this case, use client credentials.
- Scope: from the App created. Choose Thing to retrieve the Thing status of a category, and Data to retrieve the data stored at the Raw History section.
-
URL: to make the request:
To retrieve the Things status of a Category:
https://api.swx.altairone.com/spaces/YourSpaceID/categories/YourCategoryName/things-status
to retrieve the data stored at the Raw History section for different things:https://api.swx.altairone.com/spaces/YourSpaceID/ data/?source[]=FirstThingUID&source[]=SecondThingUID
- Record path: Choose Data.
-
Click Generate Columns, and then click
Refresh Preview.
The columns are populated and the requested data is displayed.
Figure 2. - Click Save.
- Click Back to return to the Edit Dashboard view.