PC Rest API using Python - Authentication 404


I am trying to authenticate Performance center using Rest API and Python but it failing with following message

is my request correct ??

is there a setup/config change needed on PC Server to enable Rest API?

if someone has a valid request, can you post it?

 here is the request

headers = {'Authorization':'Basic', 'username':'some1', 'password': 'no1'}

about username and password

I open up tools - Password Encoder - enter username - generate - use that encoded in python script.

same process repeated on password. 

r = requests.get('http://hostname:8080/LoadTest/rest/authentication-point/authenticate', params=headers)

and below is the response

<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 404 </title>
<h2>HTTP ERROR: 404</h2>
<p>Problem accessing /LoadTest/rest/authentication-point/authenticate. Reason:
<pre> Not Found</pre></p>
<hr /><i><small>Powered by Jetty://</small></i>

2 Replies
Acclaimed Contributor.
Acclaimed Contributor.

Re: PC Rest API using Python - Authentication 404


A few suggestions:

  • PC related questions are better answered in the PC practitioners forum here
  • There are many questions relating REST API with PC that you'll find with solutions and explanations
  • I recommend reviewing the latest webinar on REST API here for additional information

Good Luck,



Respected Contributor.
Respected Contributor.

Re: PC Rest API using Python - Authentication 404


I see 2 possible issues with your request:

  1. the "hostname" in your url is the ALM hostname, not PC Server. You need to send the request to PC Server, not ALM server, and possible also remove the port 8080 as PC rest API is hosted in IIS, and by default is on port 80 (unless you manually changed it).
  2. The credential are sent incorrectly. Here is how to send credentials:
    1. build a string in the following format: [username]:[password]
    2. encode it to base 64.
    3. send a header "Authorization: Basic [YourEncodedCredentials]"

I hope this helps, let us know the outcome.



The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.