Skip to main content

How to use the curl command in Qlik Enterprise Manager

100% helpful (1/1)
cancel
Showing results for 
Search instead for 
Did you mean: 
Gerald_U
Support
Support

How to use the curl command in Qlik Enterprise Manager

Last Update:

Dec 21, 2023 10:05:07 AM

Updated By:

Sonja_Bauernfeind

Created date:

Dec 21, 2023 10:05:07 AM

Logging into the Qlik Enterprise Manager console prompts for a username and password. The login is generally in the format of domain_name\username. These credentials can be used for curl to obtain a sessionid to run API commands from curl.

You can authenticate either using domain\username or basic authentication using a base64 encoded string of the username and password.

Username and Password:

  1. Open a command prompt

  2. Run the following command, where DOMAIN_NAME\USER is the username you want to authenticate with and <your URL> the hostname.

    curl -i -k -u DOMAIN_NAME\USER https://<your URL>/attunityenterprisemanager/api/V1/login
  3. Enter the password when prompted

  4. Copy the apisessionid returned 

    sessionid returned with CURL.png

Basic Authentication:

  1. Encode your username and password using a base64 encoder
    1. Create the following string out of your username and password: USER@YOURDOMAIN:YourPassword
    2. Use a base64 encoder to encode the string. The result will look something like this: YWRtaW5YWw6UGFzc3dmQxMjMh (not a real result)
    3. Copy the result

  2. Open a command prompt

  3. Run the following command, inserting your encoded credentials and hostname: 

    curl -i -k --header "Authorization: Basic YWRtaW5YWw6UGFzc3dmQxMjMh" https://<your URL>/attunityenterprisemanager/api/V1/Login
  4. Copy the apisessionid returned 

    sessionid returned with CURL basic authentication.png


You can then use the generated session ID to run other API commands. The session ID is valid for ten minutes before a new one needs to be created. 

Example API call to stop a task:

curl -i -k -X POST --header "EnterpriseManager.APISessionID: YdfaW5YWw6UGFzs3dmQxMjMh" --header "Content-Length: 0" https://SERVERNAME/attunityenterprisemanager/api/v1/servers/Replicate/tasks/Test-Task?action=stop

 

Environment

Qlik Enterprise Manager 

Labels (1)
Version history
Last update:
‎2023-12-21 10:05 AM
Updated by: