Engine API

The Qlik Engine API is a WebSocket protocol that uses JSON to pass information between the Qlik Sense Engine and the clients. To explain this sentence a bit further, a WebSocket is a both-ways communication protocol that allows the Qlik Engine API to communicate with the web browser of a user. The communication is both ways (full-duplex), which means that the user can, for example, pass a selection to the Qlik Engine API but also the Qlik Sense Engine can push updated data to the user's browser, without the user having to accept or do anything.

The format in which the WebSocket communicates is JSON, which stands for JavaScript Object Notation. It's a data structure in a string format following a specific syntax using brackets, colons, and double quotes, which can easily be interpreted by JavaScript. JSON is characterized and defined using the following set of core rules:

  • Data is in name/value pairs
  • Data is separated by commas
  • Curly braces hold objects
  • Square brackets hold arrays

The following is an example of a JSON structure:

{
    "id": 1,
    "name": "A green door",
    "price": 12.50,
    "tags": ["home", "green"]
}

Using the preceding structure, the client and the Qlik Engine API send data information that is then processed by the browser or the engine itself. To put this a bit more technically, all communication protocol follows the JSON RPC specification. This means the Engine API can be used in every programming language that supports sockets and JSON.

The Qlik Engine API consists of a set of objects representing apps, lists, fields, objects, and so on, which are organized in a hierarchical structure. This means you first need to call the app before you can call the list.

Using the Qlik Engine API, you can perform actions on these objects, such as the following:

  • Creating apps and loading data
  • Building stories
  • Getting system information

Using the Qlik Engine API, you can communicate with the Qlik Sense Engine directly without needing to open Qlik Sense (it needs to run in the background though). This allows you to build custom web apps or mashups, or to retrieve a piece of aggregated information from the Qlik Engine API to pass it on to a different system to consume the results.

Furthermore, as you can also copy, reload, and publish apps using the Qlik Engine API, it can therefore also be used to automate repetitive or complicated updates or changes to an app.

Using the Qlik Sense .NET SDK (https://help.qlik.com/en-US/sense-developer/September2017/Subsystems/NetSDKAPI/Content/Introduction/Net-Sdk-Intro.htm), you can also build Windows applications that leverage the Qlik API directly.

Fortunately, Qlik has provided a handy platform to explore the Qlik Engine API to better understand the collection of methods and the possible outputs directly on an existing app. This is available in the dev-hub under the Engine API Explorer section, as shown in the following screenshot:

The Engine API Explorer
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
52.15.55.18