Performance Center Practitioners Forum
cancel

PC 11.5 - REST API request format to run test

SOLVED
Go to solution
J_Jena
Trusted Contributor.

PC 11.5 - REST API request format to run test

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

4 REPLIES
EyalR
Micro Focus Expert
Solution

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

 

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

Oren_Pelzman
Respected Contributor.

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

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.

J_Jena
Trusted Contributor.

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

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

Oren_Pelzman
Respected Contributor.

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

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.