How To Use REST API With QEM (Qlik Enterprise Manager)

Creation date: 27/01/2021 17:57    Updated: 19/09/2024 11:08    qlik qlik enterprise manager rest api
Note that the example shown is run using powershell. You can omit '.exe' if running the commands under command prompt.

REST API functionality is enabled out of the box after QEM is installed. Once QEM is installed, we can start to run API using cURL (the developer’s user guide example uses cURL as the engine).

First thing we need to do is to ‘Login’ in order to get the API session ID, required for other API parameter that we later need to run other APIs (in this example we will stop and start a task). Example:



Where \Administrator is a local user in my machine, and ibtl2ws2019qr is the host name of the machine. Please note that this login method using -u parameter is not in the developer’s user guide. The user guide method requires you to encode the user and password into base64 format, i.e. "user@domain:password" encoded into a base64 value. I believe that doing it this way will be clearer as an example.

This will prompt me to enter the password for the user…


Once successful, I get the following output:


With the API session ID, we can now start to use other parameters. Note that the session ID may expire if it is inactive, in that case you need to Login again.

Let’s start with starting a task. In the developer’s user guide, description is located under RunTask API. An example that we can use as below…

curl.exe -k -X POST --header "EnterpriseManager.APISessionID: <your unique session id>" --header "Content-Length: 0" https://<hostname>/attunityenterprisemanager/api/v1/servers/<QEMservername>/tasks/<taskname>?action=run"&"option=<runoption>

Note: <QEMservername> is the name given to the server in the QEM console, not the actual windows/linux server name.


Notice the ‘RESUME_PROCESSING’ option, this can be replaced with other run option such as ‘RELOAD_TARGET’ if you needed to reload instead of resume.

If successful, you will be able to see the task started and the following output in PS:


With the task started, let’s try to stop the task. Details on this under StopTask API section. The format is similar to RunTask, with a different action…

curl.exe -k -X POST --header "EnterpriseManager.APISessionID: <your unique session id>" --header "Content-Length: 0" https://<hostname>/attunityenterprisemanager/api/v1/servers/<QEMservername>/tasks/<taskname>?action=stop


You will then see the task stopped.

Other parameters can be used as of developer’s user guide in this manner. 

Files