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…
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…
You will then see the task stopped.
Other parameters can be used as of developer’s user guide in this manner.