Highlighted
Super Contributor.
Super Contributor.
821 views

PC 11.5 - REST API request format to run test

Jump to solution

Hi,

I'm struggling to run a load test in PC 11.5 with below REST call. I'm always getting bad request error. Please can you help where am I going wrong?

web_custom_request("web_custom_request",
        "URL=http://almhost:8080/qcbin/rest/domains/domainname/projects/projectname/runs/",
        "Method=POST",
        "RecContentType=application/xml",
        "Resource=0",
        "Referer=",
        "Body=<Run xmlns=\"http://www.hpe.com/PC/REST/API\">" 
        "<PostRunAction>Collate Results</PostRunAction>" 
        "<TestID>30</TestID>" 
        "<TestInstanceID>1</TestInstanceID>" 
        "<TimeslotDuration>" 
            "<Hours>0</Hours>" 
            "<Minutes>45</Minutes>" 
        "</TimeslotDuration>"
        "<VudsMode>false</VudsMode>" 
        "</Run>",
        "Snapshot=t66.inf", 
        LAST);

Thanks

0 Likes
1 Solution

Accepted Solutions
Highlighted
Honored Contributor.
Honored Contributor.

Re: PC 11.5 - REST API request format to run test

Jump to solution

 

Hi J_Jena,

Please note that PC REST API is not avaliable in PC 11.5.
Specifically for PC REST API, the request should be sent to the PC server and not the ALM as in your example but as I mentioned above it will not work in PC 11.5.

Regards,
Eyal

View solution in original post

4 Replies
Highlighted
Honored Contributor.
Honored Contributor.

Re: PC 11.5 - REST API request format to run test

Jump to solution

 

Hi J_Jena,

Please note that PC REST API is not avaliable in PC 11.5.
Specifically for PC REST API, the request should be sent to the PC server and not the ALM as in your example but as I mentioned above it will not work in PC 11.5.

Regards,
Eyal

View solution in original post

Highlighted
Respected Contributor.
Respected Contributor.

Re: PC 11.5 - REST API request format to run test

Jump to solution

Hi Jena,

As Eyal mentioned, PC Rest API isn't available in versions 11.5x.

It was intially intoduced in version 12.0.

Also, the url you are using is not correct, it should be pointed to PC Server and not ALM server.

For more details, see here.

Highlighted
Super Contributor.
Super Contributor.

Re: PC 11.5 - REST API request format to run test

Jump to solution

Hi Oren,

I am able to make GET rest calls with "http://almpchost:8080/qcbin/rest/domains/domainname/projects/projectname/runs/" which shows me the list of executed load tests. So I thought it may be able to start a test.  I also checked in document library in PC, I can see REST API reference but cannot find examples to run test.

Cheers

0 Likes
Highlighted
Respected Contributor.
Respected Contributor.

Re: PC 11.5 - REST API request format to run test

Jump to solution

Hi Jena,

The GET request you mentioned is part ALM rest API, and it isnt public, so i dont think it is documented anywhere (how did you catch it? with Fiddler?).

The documentation library in PC refers to PC rest API, but surely isnt part of PC 11.5 as it was first introduced in PC 12.00.

If you upgrade your PC/ALM environment, you will be able to use the PCpublic rest api's.

I can provide the start-run example nevertheless. Let me know when you have an environment to use it.

Regards,

Oren.

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.