Rest API

Rest API allows you to connect to external/remote REST APIs and poll data periodically.
Rest Service allows other external processes and systems to connect lygos and post data on local Rest APIs you create at your Lygos Server.

Rest API:


You can either create connection options from a link, or input them on the configuration menu.
Lygos allows 3 Basic Authentication types if required:

  • Basic: Username/Password
  • JWT Bearer: Token
  • OAuth2: API Key

Users can enter Default and Query API and Query Parameters.
Here is how our UI corresponds to a RestAPI URL Schema: http://www.example.com:1234/api/position.json?a=1&b=2

  • Host: http://www.example.com
  • Port: 1234
  • Default API: api
  • Query API: position.json
  • Arguments:
    • a = 1
    • b = 2

Users can create multiple queries from same host/port/auth/api.
Other Options Users can configure:

  • Polling Frequency:  You can control how often your data is refreshed.
  • Data Window Size: This is  how many past results are stored in your data window. 
    • Data Windows can be used for animations of data visualizations. 
    • If Data does not have datetime values, data receival time can be used as its temporal value, and thus be animated.
    • For example, polling data every minute and with window of 60, you can animate your last hour with 60 data points on data visualizations and maps.
  • Data Polling Mode: You can determine if the query is polled on demand or on in the background.
    • On Demand: Data is temporary. It is polled only if a visualization is actively using this data source on the screens.
    • On Background: Data is persistent. It is polled on the background and data window is stored when app closes or relaunches.
  • Data Format: Determine Data Format of incoming data through our Data Format Tool.


Rest Service:


You can create Rest API points on Lygos server at http://<server ip address>:7300/api/<base>/<query>
Users can Post,Put and Patch to this URL. This url is

  • Host: Server IP Address (Read Only)
  • Port: Server Port (Read Only)
  • Username/Password: This API uses Basic Authentication, client posting data should provide these credentials.
  • Base API: corresponds to <base> on URL Scheme.
  • Query API: corresponds to <query> on URL Scheme

Data arriving on this API is processed according to Data Format provided and immediately relayed to visualizations that uses this as a data source. Therefore there is no polling frequency.
Other Options that Users can configure:

  • Data Window Size: This is  how many past results are stored in your data window. 
    • Data Windows can be used for animations of data visualizations. 
    • If Data does not have datetime values, data receival time can be used as its temporal value, and thus be animated.
    • For example, polling data every minute and with window of 60, you can animate your last hour with 60 data points on data visualizations and maps.
  • Data Polling Mode: You can determine if the query is polled on demand or on in the background.
    • On Demand: Data is temporary. It is polled only if a visualization is actively using this data source on the screens.
    • On Background: Data is persistent. It is polled on the background and data window is stored when app closes or relaunches.
  • Data Format: Determine Data Format of incoming data through our Data Format Tool.