How can we help?

Searching:

0 results found

Dashboards/Post

POST api/dashboards

Description

Creates a new Dashboard.

See the following for request and response details ‒

See Also

Request ‒ Dashboards/Post

Property Type Description
name String The name of the Dashboard.
appId String A unique Application identifier that is automatically generated by Axonize. This is the identifier of the Application to which this Dashboard is assigned.
widget Specifies the widget type, which can be one of the following –

  • 1 – Devices widget
  • 2 – Alarms widget
  • 3 – Readings widget
  • 4 – Map widget
  • 5 – Alarms List widget
  • 6 – Open Alarms widget
  • 7 – Clock widget
  • 8 – Weather widget
  • 9 – Aggregated Readings widget
  • 10 – Chart widget
  • 11 – Command widget
  • 12 – Camera widget
  • 13 – Gauge widget
  • 14 – Arch Gauge widget
  • 15 – Circle Gauge widget
  • 16 – All Applications widget
  • 17 – Reports widget
  • 18 – KPI widget
  • 19 – Properties and Settings widget
  • 20 – Overall Readings widget
  • 21 – Heatmap widget
widget/id The unique identifier of the widget.
widget/settings Specifies the settings of the widget. Settings vary, depending on the widget type specified in the widget property (see above). For more details about widget settings properties, see page 414.
widget/style Indicates the colors used in the widget.
widget/style/backgroundColor The background color of the widget, in Hex Color code format. The color is specified in Hex Color code format. For example, white is #FFFFFF.
widget/style/color The color of the widget, in Hex Color code format.
widget/layout Specifies the location of the widget inside the frame of the Dashboard.
widget/layout/x Numeric The absolute X position, in steps, where each step is 160 pixels. For example, 1 step is from 0–160 pixels, 2 steps is from 161–320 pixels and so on.
widget/layout/y Numeric The absolute Y position, in steps, where each step is 160 pixels. For example, 1 step is from 0–160 pixels, 2 steps is from 161–320 pixels and so on.
widget/layout/w Numeric The width of the widget, in steps, where each step is 160 pixels. For example, 1 step is from
0–160 pixels, 2 steps is from 161–320 pixels and so on.
widget/layout/h Numeric The height of the widget, in steps, where each step is 160 pixels. For example, 1 step is from
0–160 pixels, 2 steps is from 161–320 pixels and so on.
createUser, createDate,
updateUser
See Common Response Properties.

Widget Settings by Widget Type

 

Widget Type 1 – Devices Widget

Property Type Description
title String The widget title.
type String The type of devices included in the widget. Values are All, Connected Devices or Disconnected Devices.
groups String The list of group IDs.

 

Widget Type 2 – Alarms Widget

Property Type Description
title String The widget title.
type String The type of alarms included in the widget. Values are All, Minor, Major, Critical and Warning.
groups String The list of group IDs.

 

Widget Type 3 – Readings Widget

Property Type Description
title String The widget title.
device String The Device ID.
reading Object A reading object.

For example:

“{“type”:1054,”name”:”Water Flower (L/min)”}”

 

Widget Type 4 – Map Widget

Property Type Description
title String The widget title.
groups String The list of group IDs.
hierarchy Boolean Shows or hides the Device group tree.

 

Widget Type 5 – Alarms List Widget

Property Type Description
title String The widget title.
groups String The list of group IDs.

 

Widget Type 6 – Open Alarms Widget

Property Type Description
title String The widget title.
device String The Device ID.
severity String The severity of the alarm.

 

Widget Type 7 – Clock Widget

Property Type Description
title String The widget title.
type String The type of clock used in the widget. Values are  Digital or Analog.
zone String The timezone used in the widget.

 

Widget Type 8 – Weather Widget

Property Type Description
location String The location whose data displays in the widget.

For example:

“{“name”:”Tel Aviv District”,”id”:293396}”

 

Widget Type 9 – Aggregated Readings Widget

Property Type Description
title String The widget title.
groups String The list of group IDs.
hierarchy Boolean Shows or hides the Device tree. Values are True or False.
reading Object List of readings.

For example:

“[{“type”:1054,”name”:”Water Flower (L/min)”}]”

groupView Boolean Shows devices grouped by group. Values are True or False.

 

Widget Type 10 – Chart Widget

Property Type Description
title String The widget title.
aggregation String The aggregation method used.

Values are  average, count, sum, min, max, raw and duration.

chartDisplay String The type of chart display.

Values are shared, stacked and unstacked.

chartType String The type of chart.

Values are line, spline, pie, area, heatmap, bar and column.

compareDates Array of Strings The dates to compare in the widget.

For example:

[“2018-09-18T21:00:00.000Z”, “2018-09-19T20:59:59.999Z”]

dates Array of Strings The date range for the data in the widget.

For example:

[“2018-09-19T21:00:00.000Z”, “2018-09-20T20:59:59.999Z”]

device String The Device ID.
deviceId String The Device ID.
interval String The interval at which data is aggregated.

Values are hours, minutes and days.

machineLearningMethod String Enables you to forecast or predict the readings in the next time period based on algorithmic calculations.

Values are AnomalyDetection, LinearForecast and QuadraticForecast.

mainPicker String The time range for the data to display in the chart.

Values are today, yesterday, week, 7d, month, 30d, 90d, year and custom.

selectedReadings Object List of readings.

For example:

[{type: 1054, datetime: “2017-10-30T11:56:22Z”, name: “Water Flower (L/min)”, value: “5”,…}]

 

Widget Type 11 – Command Widget

Property Type Description
title String The widget title.
device String The Device ID.
commands String The Command ID.

 

Widget Type 12 – Camera Widget

Property Type Description
title String The widget title.
devices String List of Device IDs.

 

Widget Type 13 – Gauge Widget

Property Type Description
title String The widget title.
dates Array of Strings The date range for the data in the widget.

For example:

[“2018-09-19T21:00:00.000Z”, “2018-09-20T20:59:59.999Z”]

deviceId String The Device ID.
displayMode String The data type to display in the widget.

Values are readings, analytics and duration.

first String The first color.

For example:

“#55BF3B”

green Numeric The value range for the green color to display on the gauge.
red Numeric The value range for the red color to display on the gauge.
yellow Numeric The value range for the yellow color to display on the gauge.
mainPicker String The time range to which the analytics function applies.

Values are today, yesterday, week, 7d, month, 30d, 90d, year and custom.

reading Object Reading object.

For example:

“{“type”:1054,”name”:”Water Flower (L/min)”}”

second String Second color.

For example:

“#DDDF0D”

third String Third color.

For example:

“#DF5353”

refreshRate Numeric Widget refresh rate, in minutes.

 

Widget Type 14 – Arch Gauge Widget

Property Type Description
title String The widget title.
dates Array of Strings The date range for the data in the widget.

For example:

[“2018-09-19T21:00:00.000Z”, “2018-09-20T20:59:59.999Z”]

deviceId String The Device ID.
displayMode String The data type to display in the widget.

Values are readings, analytics and duration.

first String The first color.

For example:

“#55BF3B”

green Numeric The value range for the green color to display on the gauge.
red Numeric The value range for the red color to display on the gauge.
yellow Numeric The value range for the yellow color to display on the gauge.
mainPicker String The time range to which the analytics function applies.

Values are today, yesterday, week, 7d, month, 30d, 90d, year and custom.

reading Object Reading object.

For example:

“{“type”:1054,”name”:”Water Flower (L/min)”}”

second String Second color.

For example:

“#DDDF0D”

third String Third color.

For example:

“#DF5353”

refreshRate Numeric Widget refresh rate, in minutes.

 

Widget Type 15 – Circle Gauge Widget

Property Type Description
title String The widget title.
dates Array of Strings The date range for the data in the widget.

For example:

[“2018-09-19T21:00:00.000Z”, “2018-09-20T20:59:59.999Z”]

deviceId String The Device ID.
displayMode String The data type to display in the widget.

Values are readings, analytics and duration.

first String The first color.

For example:

“#55BF3B”

green Numeric The value range for the green color to display on the gauge.
red Numeric The value range for the red color to display on the gauge.
yellow Numeric The value range for the yellow color to display on the gauge.
mainPicker String The time range to which the analytics function applies.

Values are today, yesterday, week, 7d, month, 30d, 90d, year and custom.

reading Object Reading object.

For example:

“{“type”:1054,”name”:”Water Flower (L/min)”}”

second String Second color.

For example:

“#DDDF0D”

third String Third color.

For example:

“#DF5353”

refreshRate Numeric Widget refresh rate, in minutes.

 

Widget Type 16 – All Applications Widget

Property Type Description
title String The widget title.

 

Widget Type 17 – Reports Widget

Property Type Description
entity String The entity to include in the report.

Values are devices, products, alarms, rules, users, applications and audit.

reportId String The Report ID.
title String The widget title.

 

Widget Type 18 – KPI Widget

Property Type Description
aggregation String The function to apply to the data. For telemetric data, you can select from sum, average, min, max and count. For state data, such as opening or closing a switch, you can only select count.

Values are  average, count, sum, min, max and duration.

dates Array of Strings The date range for the data in the widget.

For example:

[“2018-09-19T21:00:00.000Z”, “2018-09-20T20:59:59.999Z”]

device String The Device ID.
mainPicker String The time range for the data to display in the widget.

Values are today, yesterday, week, 7d, month, 30d, 90d, year and custom.

reading Object Reading object.

For example:

“{“type”:1054,”name”:”Water Flower (L/min)”}”

refreshRate Numeric Widget refresh rate, in minutes.
title String The widget title.

 

Widget Type 19 – Properties and Settings Widget

Property Type Description
title String The widget title.
device String The Device ID.

 

Widget Type 20 – Overall Readings Widget

Property Type Description
title String The widget title.
device String The Device ID.

 

Widget Type 21 – Heatmap Widget

Property Type Description
title String The widget title.
defaultView String
groups String
readings Object
date Object

 

Example JSON Dashboards/Post Request

curl -X POST \

http://api.dev.axonize.com/api/dashboards \

-H ‘Accept: application/json, text/plain, */*’ \

-H ‘Cache-Control: no-cache’ \

-H ‘Content-Type: application/json’ \

-H ‘appId: 1aaf017c-b987-4f53-94d6-ad9afb8e4767’ \

-d ‘{

“widgets”: [

{

“id”: “67986a0a-bab8-4cb3-a881-25c715277020”,

“widget”: “1”,

“style”: {

“backgroundColor”: “#423b9c”,

“color”: “#fff”

},

“layout”: {

“x”: 0,

“y”: 0,

“w”: 2,

“h”: 1

}

}

],

“name”: “dashboard”,

“appId”: “1aaf317c-b987-4f53-94d6-ad9afb8e4767”,

“createDate”: “2018-08-20T07:15:37.41Z”,

“createUser”: “5883b7ch922dd1139c1d15d0”,

“updateUser”: null

}’

Response ‒ Dashboards/Post

All the same properties in the request are returned in the response. The response that is returned also contains the following property –

Property Type Description
id String This is the unique identifier automatically assigned by Axonize when a Dashboard is created. This id is returned in the response of the Dashboards/Post.
createDate, createUser, updateDate,
updateUser
See Common Response Properties.

Example JSON Dashboards/Post Response

Status 201 – Created

{

“widgets”: [

{

“layout”: {

“x”: 0,

“y”: 0,

“w”: 2,

“h”: 1

},

“widget”: “1”,

“id”: “67986a0a-bab8-4cb3-a881-25c715277020”,

“settings”: {},

“style”: {

“backgroundColor”: “#423b9c”,

“color”: “#fff”

}

}

],

“name”: “dashboard”,

“id”: “5c2dc62de3b0ca38e01124c8”,

“appId”: “1aaf317c-b987-4f53-94d6-ad9afb8e4767”,

“createDate”: “2019-01-03T08:22:05.5423318Z”,

“createUser”: “5883b7ch922dd1139c1d15d0”,

“updateUser”: null

}