3

As the title says I need to get traceability information for my requirements with hp alm rest api. What endpoint do I have to use? The documentation seems to be pretty much not existing! Somewhere I've read that the following endpoint should return a list of all available endpoints but I only get "Not found" -> /qcbin/rest/resource-list

So how to work with this api???

stefan
  • 1,336
  • 3
  • 21
  • 46

2 Answers2

1

honestly speaking I did not get exactly your query. In particular to work with the REST api you should use a valid login before sending any other queries!

The "get started" from HP is quite helpful, but it may be different if you have a previous version. Link for the 12.50:

http://alm-help.saas.hpe.com/en/12.50/api_refs/Performance_Center_REST_API/Performance_Center_REST_API.htm

Having a look there and I was not able to understand the command you were mentioning. Here another link from HP where I found that, which is again mentioning the login steps of course:

https://community.saas.hpe.com/t5/All-About-the-Apps/A-user-guide-to-REST-API-with-HPE-ALM/ba-p/223878#.WVo2wVElGpo

Anyway if you are new to HP QC REST API, then I would suggest you to create your own module.

I have created a small module to send REST requests to HP ALM using python. The support module is called "requests". I guess that if you are familiar with android, then you should be familiar with python/java too. Plenty of answers to your problems you will find already answered anyway in SO.

After you will proper login, then you should be able to send easily new REST msg and get your goal. Have a nice day! ciao ciao!

enter image description here

Marco smdm
  • 1,020
  • 1
  • 15
  • 25
  • I'm already able to connect and login to a project. I'm also able to get defects.This is pretty much the only documented stuff! I'm also able to get my requirements, however now I want to get the traceability information for them as my title says. An endpoint is an "url" for a resource, if you are not familar with that. Usually if you use a REST api you get at least a list of known endpoints... – stefan Jul 04 '17 at 07:12
  • 1
    For the collection of resources in the project, then please try: /qcbin/rest/domains/{domain}/projects/{project}/resources – Marco smdm Jul 04 '17 at 08:44
  • This is not what I'm talking about! Where is the documentation for the entire api? I was only able to find how to connect and how to get defects. Where can I see what operations are supported by this api? Please read the title of my question. Right now I'm just interested in getting the traceability information of my requirements. Where is this endpoint? In future it would be great to know what this api supports! – stefan Jul 05 '17 at 09:24
  • 1
    http://alm-help.saas.hpe.com/en/12.50/api_refs/REST_TECH_PREVIEW/ALM_REST_API_TP.html this is the official rest api for 12.50. In addition the help/library on the web interface should be quite the same :-) – Marco smdm Jul 05 '17 at 09:30
  • 1
    So @stefan: looking at the link above there you can find Returns the below. A web page that offers the user the choice of two options: Application resources view :http://SERVER:PORT/qcbin/rest/resource-list?doc=resources Wink Resource registry xml view: http://SERVER:PORT/qcbin/rest/resource-list?doc=registry – Marco smdm Jul 05 '17 at 12:00
  • 1
    These requests are giving you the endpoint for the Server mentioned. I have tried the same on previous version of QC and it is working properly also with the 11.52. Please be aware not to use your specific project and domain as showed above! Hope this solve now your query! – Marco smdm Jul 05 '17 at 12:02
  • Unfortunately, we are currently using ALM 11.0.0.8413 and there this is not working. At the moment, we are using OtaClient in our quite large c# application to do server operations but we are quite unhappy with it since COM is very very very old fashioned and brings a lot of problems with it. Now my job is to do investigations on this new REST Api to see how much we can replace with it. Would it be possible to send me the return value of “resource-list” so that I’m able to check this out? – stefan Jul 06 '17 at 07:44
  • 1
    Hi @stefan with the ALM 11.0 you should check the api-descriptor. The api-descriptor resource is no longer available in 12.x version and for that you have to use resource-list instead. The resource-list command as I wrote above are giving you back an HTML file with list of endpoints (the url where to find those items). Due to company policy I cannot send you back this html file (above just a short cut of my desktop)...the list is very long. – Marco smdm Jul 06 '17 at 07:54
  • 1
    Honestly speaking the REST API is much more stable and fast (after you create your automation), but I have to admit that for the 11.0 version plenty of bugs where still there. Already the 11.52 is giving you a better tool and the latest one is solving plenty of issues. – Marco smdm Jul 06 '17 at 07:56
  • 1
    Please check also the help coming from the HP (directly the one from the GUI interface) somewhere you should find the REST API library description for the 11.0 (unfortunately I cannot find by googling). Have fun with rest api and I hope now the query above is solved! Have a nice day!Ciao – Marco smdm Jul 06 '17 at 07:59
  • We are planning to switch to 12.5 soon and therefore I have to do some investigations on what’s possible and what not… I finally succeeded by using „/api-descriptor“. I already noticed that in 11 are a few bugs. Unfortunately, also in the very important requirement trace field of the requirement object. Hope this is fixed in newer version! Thanks for your support!! – stefan Jul 06 '17 at 08:11
  • 1
    Then with 12.5 most of the problems will be solved! You can already refer to the mentioned REST API and maybe start to develop something. (Even the login will be done I guess on a different endpoint with latest version :-) ) anyway it is worth the time! you can of course automate all the common action and use the gained time to do smt else! Let's close the question and wish you the best in your goal!Ciao! – Marco smdm Jul 06 '17 at 08:24
0

The REST API (at least until 12.55) does not support reading traceability of requirements. But you can access the database directly. All traceability information are stored in table REQ_TRACE.

Marteng
  • 1,179
  • 13
  • 31