Documentation

API Blocks is a way to view real time information from any number of API endpoints from around the web. This lets you build up a dashboard of information that's important to you at a glance.

If it's in an API that you have access to, you can put it in an API block.

Getting Started

It's usually best to have the URLs and access tokens ready before you want to add a block. Lets use the Open Weather API as an example.

Lets say we want to know the wind speed in London at the current moment, which might be handy if you're riding in to work. First we will need to know the endpoint for the Open Weather London entries, which happens to be: api.openweathermap.org/data/2.5/weather?q=London.

Authentication

Not all APIs require authentication, but if they do it's often in the form of an API Key or Token. Currently you can add API blocks that use token authentication, IP Whitelists, or no authentication. Support for other methods of authentication are also being worked on..

For our Open Weather API example, we can sign up for an authentication token here: http://openweathermap.org/appid.

The easiest way to use token authentication is to add it to our URL, for the Open Weather API the access token parameter is appid so we would append that and our token to our url like so: api.openweathermap.org/data/2.5/weather?q=London&appid={your token here}

Adding a Block

To add a block, on your dashboard you simply need to hit "Add New Block" and then configure your block.

To continue our London Wind Speed example, lets configure our block:

Block Title: This will be the title of the block, for example "London CBD Wind Speed".

Data Suffix (optional): This is a bit of text that can be appended to the data you get from the end point. For example when we receive our wind speed from the API, it will simply be a number. With a data suffix, we can add that the number represents miles per hour by adding "mp/h" as our data suffix.

API Url: This is the called to access the API endpoint. For our example, it is: api.openweathermap.org/data/2.5/weather?q=London&appid={your token here}

Now we hit "Fetch URL". What we get back will be the response of the API endpoint we just called, and in the case of the Open Weather API it is an object containing a bunch of information about the current weather in London.

From here we simply find the piece of information we want display in the block, click it, and hit the now save button above.

That's it! You now have a new block saved to your dashboard that will display every time you bring up the site.

Removing a Block

Removing a block is pretty straight forward, simply click the cog icon on the block you want to remove, then hit the remove icon and select confirm.

Please note this is permanent, as the block is removed from the system immediately and irreversibly.