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

login REST API not working using Curl

We are using EM 2021.5 (May 2021). I have admin privileges on the EM server. When try to use 

 

curl -i -k --header "Authorization: Basic <encoded string>" https://lape1em2/attunityenterprisemanager/api/v1/login, i get unathorized access error. The string is encoded with user@domain:password. I am using base64 command from linux. 

The manual ask to provide permission to execute login api but I cannot find how to do this.

Any suggestions?

Labels (1)
4 Replies
Steve_Nguyen
Support
Support

@kalpesh97

 

1. can you login to the https://lape1em2/attunityenterprisemanager/  using the same credential that you use for the API ?

 

2. from the QEM UI, check what permission is the user have ?

 

3. check the QEM logs under ~\data\logs to see what user show for unauthorized ?

 

4. normally the credential need to be encoded with qemserver\username:password ,,, if domain then yourdomain\username:password 

Help users find answers! Don't forget to mark a solution that worked for you! If already marked, give it a thumbs up!
kalpesh97
Contributor II
Contributor II
Author

4. normally the credential need to be encoded with qemserver\username:password ,,, if domain then yourdomain\username:password 

 

What are ,,, at the end? I assume they are required. let me know what the string should be for AD base server. 

BTW, 1, 2 and 3 checked out without any issue. I have admin previleges to the the server and don't see any errors in logs. i am able to login using URL without any issue.

Steve_Nguyen
Support
Support

@kalpesh97 

 

to user the domain account :

 

you need to first encode your credential :

 

example:

https://www.url-encode-decode.com/base64-encode-decode/

 

so user : domainabc\username:password

 

would get you : ZG9tYWluYWJjXHVzZXJuYW1lOnBhc3N3b3Jk 

 

then use :

 

curl -i -k --header "Authorization: Basic ZG9tYWluYWJjXHVzZXJuYW1lOnBhc3N3b3Jk " https://lape1em2/attunityenterprisemanager/api/v1/login

Help users find answers! Don't forget to mark a solution that worked for you! If already marked, give it a thumbs up!
Heinvandenheuvel
Specialist II
Specialist II

Stever wrote>> so user : domainabc\username:password

That may or might not be correct, but just like @kalpesh97  initialliy indicated, the Enterprise Manager API Guide indicate:

"user@domain:password converted to base 64 [string] "

under

https://{host}/attunityenterprisemanager/api/v1/login

fwiw,

Hein.