Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
vish123
Creator III
Creator III

How to find Qlik Enterprise Manager Session ID for connecting to API

Hi Team,

I have this below code to get the task list from QEM. 

# Define the URL for the API call
$url = "https://computer.network.net/attunityenterprisemanager/api/v1/servers/myrepsrv1/tasks"

# Prepare the headers for the API call, specifically the session ID
$headers = @{
"EnterpriseManager.APISessionID" = "wCo0_KvjEUFROvfHF5KGrw"
}

# Make the HTTP GET request and ignore SSL certificate validation errors
try {
$response = Invoke-WebRequest -Uri $url -Headers $headers -Method Get -SkipCertificateCheck

# Check if the request was successful (status code 200)
if ($response.StatusCode -eq 200) {
Write-Output "Tasks retrieved successfully:"
Write-Output $response.Content # Print the response content which includes the task list
} else {
Write-Output "Failed to retrieve tasks, status code: $($response.StatusCode)"
}
} catch {
Write-Output "An error occurred: $_"
}

how to find Session ID of QEM? Pls suggest.. Also I need last week task list using the same.

 

thanks

Vish123

1 Solution

Accepted Solutions
sureshkumar
Support
Support

Hello @vish123 
If you're using REST API then

A session token expires 5 minutes after the last request. After the session expires, the caller must re-authenticate to establish a new session.

Login | Qlik Enterprise Manager Help

For Example

curl -i -k -u DOMAIN name\username https://<host-name>/attunityenterprisemanager/api/V1/login

 

If You're using .NET API/Python API then kindly refer the below user guide

Authentication and authorization | Qlik Enterprise Manager Help

Authentication and authorization | Qlik Enterprise Manager Help

 

Regards,

Suresh

View solution in original post

2 Replies
sureshkumar
Support
Support

Hello @vish123 
If you're using REST API then

A session token expires 5 minutes after the last request. After the session expires, the caller must re-authenticate to establish a new session.

Login | Qlik Enterprise Manager Help

For Example

curl -i -k -u DOMAIN name\username https://<host-name>/attunityenterprisemanager/api/V1/login

 

If You're using .NET API/Python API then kindly refer the below user guide

Authentication and authorization | Qlik Enterprise Manager Help

Authentication and authorization | Qlik Enterprise Manager Help

 

Regards,

Suresh

vish123
Creator III
Creator III
Author

Thank You Suresh.. It worked for me..