
Support
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to use the curl command in Qlik Enterprise Manager
Last Update:
Dec 21, 2023 10:05:07 AM
Updated By:
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:
- Open a command prompt
- 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
- Enter the password when prompted
- Copy the apisessionid returned
Basic Authentication:
- Encode your username and password using a base64 encoder
- Create the following string out of your username and password: USER@YOURDOMAIN:YourPassword
- Use a base64 encoder to encode the string. The result will look something like this: YWRtaW5YWw6UGFzc3dmQxMjMh (not a real result)
- Copy the result
- Create the following string out of your username and password: USER@YOURDOMAIN:YourPassword
- Open a command prompt
- Run the following command, inserting your encoded credentials and hostname:
curl -i -k --header "Authorization: Basic YWRtaW5YWw6UGFzc3dmQxMjMh" https://<your URL>/attunityenterprisemanager/api/V1/Login
- Copy the apisessionid returned
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
924 Views