Highlighted
Absent Member.
Absent Member.
212 views

Performance Center REST API Authentication

I need some help as I try to get started using the Performance Center REST API. I want to create some reporting tools and found very detailed documentation for using the PC REST API included in the help files, but I am stuck at the Authentication stage (the first step). I followed the instructions in the documentation, but I only get the Error 400 code back from the server.

 

According to the documentation, this error code is defined as:

400 Bad Request. Syntax or format error

 

This is Performance Center v12.02 and I am trying to access the PC API, not the ALM API.

 

I am adding a screenshot from a SOAP UI project I set up to make the authentication call which shows all the details on the request I am sending. Can someone point out where I am going wrong? The Base64 encoded string is:

username:password 

(FYI, I changed the Base64 encoded password for this screenshot for privacy's sake and the server name is only internal to our network).

 

0 Likes
4 Replies
Highlighted
Absent Member.
Absent Member.

Re: Performance Center REST API Authentication

Also, this is how I encoded the username and password

 

String full = username + ":" + password;
byte[] encodedBytes = Base64.encodeBase64(full.getBytes());
0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Performance Center REST API Authentication

Hello Nathan,

 

Regarding the Performance Center REST API, please reference to the following KB:

 

https://softwaresupport.hp.com/group/softwaresupport/search-result/-/facetsearch/document/KM01284435

 

After you download the file, open the Performance_Center_REST_API.htm, where you are going to find a subset of the functionalities.

 

On here you can make a search about authentication, and then you are goig to have all the information regarding this specific API.

Regards,

Daniela Gómez Alvarado
Customer Support Engineer

If you find that this or any other post resolves your issue, please be sure to mark it as an accepted solution.
If you are satisfied with anyone’s response please remember to give them a KUDOS by clicking on the STAR at the bottom left of the post and show your appreciation.
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Performance Center REST API Authentication

Hi Daniela, this is actually the documentation I already have that I mentioned in my post. This is what I am working off of. Unfortunately, several points here are a little vague in exactly how to format the request packets. If you look at the screenshot I provided you can see I am working off the 'Authenticate' section of the API document. I followed the instructions, but I am still getting 'Error 400' back from the PC server.

 

Am I encoding the username and password string correctly? Is the URL format exactly right? I tried using HTTP and HTTPS. Which user creds exactly do I need to use here, can I use an ID that authenticates via LDAP? Is this the DB user?

 

If you can look at the screenshot above and point out where I am going wrong?

0 Likes
Highlighted
Honored Contributor.
Honored Contributor.

Re: Performance Center REST API Authentication

Hi Nathan,

From looking at the log of SOAP UI you attached, it seems you get an error of unknown host.

Please verify that you can access the host name you used from the client machine you are sending the requests from.

It might be a DNS issue.

Regards,

Eyal

0 Likes
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.