LiveView Server REST API

For formal documentation on the REST API, you can:

  • Use the documentation locally installed with your LiveView installation at REST API Documentation.

  • Enter http://localhost:11080/lv/api/v1/ into a web browser when connected to a LiveView server instance.

You can also access the documentation using any method you use for viewing the LiveView documentation, such as:



  • the Help system in StreamBase Studio

REST API Supported Features and Usage

The REST API assists in the rapid development of LiveView queries due to its simplicity, such that it can be tested from a web browser. In essence, the browser is the client; using other LiveView clients such as LiveView Web is not required.

The REST API facilitates integration into your environment due to its standard technology stack. As the REST API relies on standard HTTP, it is accessible from any language or toolkit that supports HTTP and JSON, such as JavaScript, Ruby, and Python.

In contrast to the other LiveView APIs listed here, which are client-side APIs, the REST API is exposed on the LiveView server side. This enables client development using your preferred language.

The LiveView REST API uses standard HTTP verbs to query and manipulate data. Through the API, you can:

  • Retrieve the details of a specific table

  • Retrieve a list of all tables on the server

  • Retrieve the version of the current server

  • Delete specified tuples on the given table, with either a query or a list of tuples with keys

  • Retrieve streaming data

  • Issue a snapshot query on the given table, with optional query filter

  • Publish new list of tuples to a table

  • Check whether the query will parse, and if so, return the schema and parsed query

Publishing using this API is intended for low-bandwidth embedded devices. It is not intended for high-bandwidth publishing, such as publishing millisecond-level data to a table.

Configuring alerts using the API is not supported. However, you can retrieve alerts from the LVAlerts table as a standard query.

Running Queries on the LiveView Server Using REST API

The REST API documentation provides the parameters and syntax available for querying the LiveView server. Running the following query examples requires a connection to a LiveView server instance. These examples use localhost, with the LiveView default port of 11080, using this URL format and appending the parameters and syntax as required:


Example 1: querying for the LiveView server version. Append /version to your URL and enter it into your browser:


Example 1 results:


Example 2: Querying a LiveView system table. Append /tables/{tablename} to http://localhost:11080/lv/api/v1 and enter it into your browser:


Example 2 results:

"long"},"tableGroup":"sys","shortDescription":"Session Information",
"reqClientCapabilities":[],"description":"Session information including remote 
host, recent activity","tableSpace":null,"capabilities":["SNAPSHOT","CONTINUOUS",
"System Table","isSystemTable":true,"createTime":1523542605141,"filter":

Example 3: Snapshot query for all tuple activity for a selected table. Append /tuples to the end of your table URL and enter it into your browser:


Example 3 results: (formated for clarity)






Live Data Example

You can test the REST API to view live data generated from your LiveView server, in an event source client context. Testing is not meant for direct navigation to the API from a web browser, however. For example, if you append /live to your URL, the browser prompts you to download content that simply does not apply to the operation. To work around this, append /lviewer or another viewer to your query.

The following example demonstrates how to display live table updates for the LVSession table using the appended /lviewer. The /lviewer junction is a quick means to test live data and is not meant to be used outside of this example. It is a best practice using a proper client when not simply exploring the REST API.

  1. Connect to a LiveView server instance. For example, from StreamBase Studio, run the Hello LiveView sample and wait for the LiveView service instance to start.

  2. Open two browser windows.

  3. In window 1, enter http://localhost:11080/lv/api/v1/tables/LVSessions.

    Notice the table information is displayed.

  4. In window 2, enter this URL: http://localhost:11080/lv/api/v1/tables/LVSessions/tuples/lviewer (or any viewer from the /live URL).

    Notice in window 2 the live data for the session is displayed.

  5. In window 1, press F5 to refresh the browser. Notice the data in window 2 is updated.

  6. Close both browsers when finished.

REST API Source Documentation

Use this URL to view the open API source documentation: http://localhost:11080/lv/api/v1/doc.yaml. Note that a LiveView Server instance must be running in order to view the documentation.

Due to technical limitations, if you use Swagger to generate a client, the issueQuery operation must be written manually with a proper Server-sent Events (SSE) client. The Swagger-generated issueQuery operation does not support SSE.