Push API
Single API endpoint to do everything with your Dashboard.
HTTP GET https://push.dashana.com/{push-key}/{widget-id}/{value}
Parameter | Mandatory | Description |
---|---|---|
{push-key} | yes | Push key is security key that authorizes you to push data to dashboard. |
{widget-id} | yes | Identity of the widget unique at the dashboard level. It can be anything you choose (eg. sales, temperature) |
{value} | no | Value that you want to send to widget. |
What can you do via Push API?
HTTP GET https://push.dashana.com/{push-key}/{widget-id}/{value}
Make HTTP GET request with push-key, widget-id and value.
If widget with provided widget-id doesn't exist it will be automatically created.
If you don't provide value existing widget will be deleted, so be careful.
First time when you push value to the Dashana widget chooses appropriate visualization based on value type, but you can change it.
HTTP GET https://push.dashana.com/{push-key}/{widget-id}?type={type}
Make HTTP GET request with push-key, widget-id and query parameter type.
To reset widget visualization to default, just provide empty value to parameter type
Parameter type | Visualization Examples & Variants |
---|---|
text | |
number | |
stats | |
trend | |
gauge | |
line | |
bar | |
onoff |
HTTP GET https://push.dashana.com/{push-key}/{widget-id}?color={color}
Make HTTP GET request with push-key, widget-id and query parameter color.
To reset widget color to default, just provide empty value to parameter color
Color | Dark Variant | Light Variant |
---|---|---|
red | light-red | dark-red |
pink | light-pink | dark-pink |
purple | light-purple | dark-purple |
deep-purple | light-deep-purple | dark-deep-purple |
indigo | light-indigo | dark-indigo |
blue | light-blue | dark-blue |
cyan | light-cyan | dark-cyan |
teal | light-teal | dark-teal |
green | light-green | dark-green |
lime | light-lime | dark-lime |
yellow | light-yellow | dark-yellow |
amber | light-amber | dark-amber |
orange | light-orange | dark-orange |
deep-orange | light-deep-orange | dark-deep-orange |
brown | light-brown | dark-brown |
grey | light-grey | dark-grey |
blue-grey | light-blue-grey | dark-blue-grey |
black | white |
Currently there are two widget sizes - narrow, which is default, and wide.
HTTP GET https://push.dashana.com/{push-key}/{widget-id}?size={size}
To set widget size to wide (or large) provide set size query parameter to 2.
To reset widget size to default, just provide empty value to parameter size
Widgets are sorted as they are added by default. To change widget order provide order number to parameter order.
HTTP GET https://push.dashana.com/{push-key}/{widget-id}?order={order}
To reset widget order to default, just provide empty value to parameter order
Widgets title is equal to widget-id by default. To change widget title provider title to parameter title.
HTTP GET https://push.dashana.com/{push-key}/{widget-id}?title={title}
To reset widget title to default, just provide empty value to parameter title
To change widget unit provide unit of measure to parameter unit.
HTTP GET https://push.dashana.com/{push-key}/{widget-id}?unit={unit}
To reset widget unit to default, just provide empty value to parameter unit
You can change default behavior or visualization for specific widget by changing widget options. Specific options can be changed for OnOff and Gauge widgets, for now.
To change widget options provide specific options to parameter opts.
HTTP GET https://push.dashana.com/{push-key}/{widget-id}?opts={opts}
To reset options to default, just provide empty value to parameter opts
If widget has multiple options you can modify them by sending all options separated with comma (,). For example, OnOff widget has two options - on and off text. You can change them as follows ops=on=Online,off=Offline.
Gauge widget options
Maximum Value - by default Gauge widget maximum value is set to the maximum value you send to widget. You can change maximum value by providing option max to opts parameter (eg. opts=max=1000)
OnOff widget options
On Text - by default OnOff widget shows "On" text when widget is in on state. You can change providing option on to opts parameter. (eg. opts=on=Online)
Off Text - by default OnOff widget shows "Off" text when widget is in off state. You can change it by providing option off to opts parameter. (eg. opts=off=Offline)