Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
jxw007
Contributor II
Contributor II

404 Error

I am trying to access  this api  to get server list

https://[host]/attunityenterprisemanager/api/v1/servers

I am working in VSCode and my code looks like this : 

 r = requests.get(url='host/attunityenterprisemanager/api/v1/servers',headers=headers,verify=False)
 
 print(r.status_code)
 
but I am getting 404, can anyone help on what's wrong here?

 

4 Replies
Alan_Wang
Support
Support

Hi @jxw007 

 r = requests.get(url='host/attunityenterprisemanager/api/v1/servers',headers=headers,verify=False)

'host' is a variable, not a static value. You need to locate our Replicate URL that you use to access Replicate and use that for the API. 

Please refer to the user guide for examples 

https://help.qlik.com/en-US/enterprise-manager/May2022/Content/EnterpriseManager/EnterpriseManager_A...

If the issue is solved please mark the answer with Accept as Solution.
jxw007
Contributor II
Contributor II
Author

I used the documentations but I get the following respectively for 

 
    response.status_code  : 200 and 
 
    response.content : b''
 
the content seems to be blank , has nothing in it.
 

 

Alan_Wang
Support
Support

  • get_server_list: Viewer role on All Servers

The API you trying to execute requires authentication. Are you providing an APISessionID to the request?

Try executing the login API and then using the APIsessionID you get from it for the get_server_list API.

https://help.qlik.com/en-US/enterprise-manager/May2022/Content/EnterpriseManager/EnterpriseManager_A...

If the issue is solved please mark the answer with Accept as Solution.
jxw007
Contributor II
Contributor II
Author

thanks a lot