TABLE OF CONTENTS



DAKboard can fetch data from other online sources via a URL. To use this feature, in the DAKboard options, under Custom Screen Settings, click the Add a Block button and select External Data/Fetch. Resize/move the block as needed, then click the pencil icon to edit the block settings. Here you'll see a URL field where you can enter the URL of your text/JSON file. 


The format of the data DAKboard is expecting should be one of the following formats:


Plain Text:


DAKboard will fetch and display plain text from a URL:


Sales today: 176



JSON Object:


DAKboard can also fetch a JSON object in name-value pair format like the following example:


{
"status":"active",
"temperature":"38",
"timestamp":"2018-09-12 16:23:11"
}



After adding the URL in the Fetch block settings, you can then select which data points to show on DAKboard, and set a name and optionally a description and icon:



Save changes to the Fetch block, and it will appear on your DAKboard looking like this: 




JSON Array:


DAKboard can also fetch an array of JSON data formatted as follows:


[
  {
    "value":"176",
    "title":"Sales",
    "subtitle":"Today"
  },
  {
    "value":"194",
    "title":"Sales",
    "subtitle":"Yesterday"
  }
]


Value is a required field. The title and subtitle are optional.




Authentication:


DAKboard supports fetching JSON data with the following authentication methods: 

  • None
  • Basic (username/password)
  • Bearer Token



Custom Images from JSON Data:


In the JSON block settings, you can enter another JSON field name into the "Icon Name" field to display an image from a URL that is part of the returned JSON:



The icon name should be appended with two underscores ( __ ). If it's multiple levels deep in your JSON data, it would look like:


 levelOne__levelTwo__url


This adds the URL to an img tag and displays it on the screen. We gave it a class name of JSON-data-icon if you need to style it further in the custom CSS.


Also, just a note: that URL field could also contain a FontAwesome icon class name if you wanted to provide the class name and use the existing icon set.



Additional Formatting:


DAKboard supports the additional formatting of data by both rounding and truncating:




Having Trouble?

- Create a Support Ticket



#features #featurelist #json #fetch #externaldata