1

I need to extract data from HP QC from backend using PHP or javascript. The data needs to be put on database or excel sheet. Is there any API to do that?

1 Answers1

0

quite common is nowadays the QC REST API, references you can get from the below link at HP:

http://alm-help.saas.hpe.com/en/12.53/api_refs/REST/webframe.htm#Overview.htm

With this QC ALM you should be able to retrieve whatever data from QC backend. I am doing that using python requests module and python scripts:

http://docs.python-requests.org/en/master/

Anyway you have to write a bit of code before getting your goal done!

Another API that is also possible to use for this task is the VAPI-XP, mostly used in the past, but also suitable for your goal. Official link below: http://alm-help.saas.hpe.com/en/12.50/online_help/Content/UG/c_vapixp_overview.htm

Hope this clarify your query! Good luck and have fun!

Marco smdm
  • 1,020
  • 1
  • 15
  • 25
  • Will Requests help in extracting from HP QC? – Kumar shaswat May 22 '17 at 12:18
  • Requests is a python module that I used to send REST messages (GET / POST / PUT / DELETE) and to initialize a session to the server. For instance requests is something like curl (if you are more familiar with Linux). In the end you have to pick up one language (for instance PHP as you wrote) and check the better way to send REST message to the Server :-) It will take time, but the automation is worth in this case :-) – Marco smdm May 22 '17 at 12:22
  • Could you please close this question now? Do you need additional clarifications? Thanks and have a nice day! – Marco smdm May 23 '17 at 09:21
  • I am a novice. Need one help. any example regarding implementation in any language? – Kumar shaswat May 23 '17 at 13:25
  • https://gist.github.com/barkady/26d077fa8556d7d987cb Here is a full REST client implemented, but as said you have to choose the best language for you. I did it in python as said. Anyway I think my answer above is the correct answer to your query :-) After you start with the first steps (connection/login and so on), you will see that it will go fast! Have a nice day. – Marco smdm May 23 '17 at 13:48
  • I have now connected properly but unable to filter on basis of different columns. How to do that? – Kumar shaswat May 29 '17 at 09:12
  • @Kumarshaswat: you should properly write a new question with description, otherwise is difficult to follow. Anyway what you can do is after you send a REST message, you are getting an xml (for instance) back. Then you can parse that and get all the values you need, ordered as you need :-) for instance I used python etree to parse the xml file. Below link: https://docs.python.org/2/library/xml.etree.elementtree.html – Marco smdm May 29 '17 at 10:28
  • Sorry for the description. I mean, while extracting data from the HP QC, we are extracting each and every column of the defect table. I want to extract data of few columns in xml format. Is it possible? – Kumar shaswat May 29 '17 at 10:38
  • You can write multiple values in your query: GET URL?query={name[Name];project[PROJ];owner[You]} and so on, it will help you in chain a query. Hope this clarify...otherwise as above you can GET a huge xml and then parsing with whatever languages :-) – Marco smdm May 29 '17 at 10:57
  • Please check also the REST API library from HP :-) – Marco smdm May 29 '17 at 10:58