How to make API requests

 > API > How to make API requests

API Requests allow you to access our servers without using the web interface, this allows a plethora of creative routines and very complex workflows that can enhance your work experience.

Note
As a pre-requisite to make API requests to Viur you need to create a Personal Access Token, learn how to create one here.

 

How to make API requests to VIUR #

This tutorial will show you how to make API requests to VIUR using Postman.

 

For this example we will request the VIUR API all the Dashboards.

Note
Viur API requests mostly start with: https://app.viurdata.com/api/1.0/, some only start with https://app.viurdata.com/

This type of request is a GET, so after setting Postman to a GET request you may paste the URL "https://app.viurdata.com/api/1.0/dashboards"

Important Note
A Key named "Authorization" with the Value "Bearer (your created Personal Access Token)" should be added to Header section of the request.

Postman 1

 

You may click Send, if the request provided is valid the API will respond.

Postman 2

 

Notice how the JSON structure is defined, this is the list of Dashboards of the account that made the request.

 

VIUR API Request List #

This is a list of some API requests you can use, all of them follow the rules shown in the example.

 

This list will be ever growing with more Requests.

 

Authentication:

TYPE URL Request Notes
POST https://app.viurdata.com/authentication?username=(:username) Authenticate a user using the API Change (:username) for the e-mail of the user you want to authenticate as

 

Dashboards:

TYPE URL Request Notes
GET https://app.viurdata.com/api/1.0/dashboards Get all Dashboards
GET https://app.viurdata.com/api/1.0/dashboards/(:id).png Export Dashboard to a PNG Change (:id) for the Dashboard's ID you want to export
GET https://app.viurdata.com/api/1.0/dashboards/(:id).pdf Export Dashboard to a PDF Change (:id) for the Dashboard's ID you want to export

 

Widgets:

TYPE URL Request Notes
GET https://app.viurdata.com/api/1.0/widgets/ Get all Widgets
GET https://app.viurdata.com/api/1.0/widgets/(:id)/data.csv Export Widget Data to a CSV file Change (:id) for the Widget's ID you want to export

 

Company:

TYPE URL Request Notes
GET https://app.viurdata.com/api/1.0/company Get current company information
GET https://app.viurdata.com/api/1.0/company/users Get users of current company
POST https://app.viurdata.com/api/1.0/company/users Create a new user on current company Request Body has to contain the following Keys with respectively Values: (email, type, name, password)
Still need help? Get in touch!
Last updated on 16th Oct 2018