RQM REST API - Test Phases not in Test Plan
When I query the RQM REST API for a specific test plan under a specific project, I don't see any evidence of my test phases (the "Test Schedule" section in the UI).
If I append ?etlmode=true I see <testphase id="_uiyfaskdy2478928234" /> tags come back in the testplan.
However, if I try to visit /resources/(project)/testphase/(id) I get 404 errors.
If I try to visit /resources/(project)/testphase/ I get an Atom feed of old test phases (nothing new) and some of the items specified in the Atom feed return 404 not found as well.
The only testphase elements iI can get to are useless to me because they're basically a year out of date at this point.
This is with RQM 3.0.1.2
If I append ?etlmode=true I see <testphase id="_uiyfaskdy2478928234" /> tags come back in the testplan.
However, if I try to visit /resources/(project)/testphase/(id) I get 404 errors.
If I try to visit /resources/(project)/testphase/ I get an Atom feed of old test phases (nothing new) and some of the items specified in the Atom feed return 404 not found as well.
The only testphase elements iI can get to are useless to me because they're basically a year out of date at this point.
This is with RQM 3.0.1.2
Accepted answer
The id that you are seeing when you use etlmode=true is the UUID of the testphase. This was implemented for a specific use case needed by common reporting are really isn't of much use to the average user of the API.
You really do want to use the testphase feed. The feed should contain all of the test phases in the project. The reason why you are only seeing old phases could be due to the fact that the feeds are paged. The first page may only contain older phases. You can also filter the feed by testplan if you just need the phases for a specific test plan. The API documentation at https://jazz.net/wiki/bin/view/Main/RqmApi contains the details of how to use the "fields" parameter to create a query.
You really do want to use the testphase feed. The feed should contain all of the test phases in the project. The reason why you are only seeing old phases could be due to the fact that the feeds are paged. The first page may only contain older phases. You can also filter the feed by testplan if you just need the phases for a specific test plan. The API documentation at https://jazz.net/wiki/bin/view/Main/RqmApi contains the details of how to use the "fields" parameter to create a query.
Comments
I'll check out the paging info. I tried to use fields but it didn't work for me. I must have not understood the wiki page....can you provide a couple examples?
The paging worked for me. As Paul mentioned, the testplan filter requires RQM 3.0.1.3 so that's out (and probably explains why I didn't get it working).
One other answer
As Rob mentioned, etlmode=true implies metadata=UUID (see https://jazz.net/wiki/bin/view/Main/RqmApi#etlmode and https://jazz.net/wiki/bin/view/Main/RqmApi#metadata).
The fields filter GET request would be:
https://<host>:<port>/<context root>/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<project area alias>/testphase?fields=feed/entry/content/testphase/testplan[@href='<test plan resourceUrl>']
Note: This filter property is only supported in RQM 3.0.1.3+.
See https://jazz.net/wiki/bin/view/Main/RqmApi#fields for more details.
The fields filter GET request would be:
https://<host>:<port>/<context root>/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<project area alias>/testphase?fields=feed/entry/content/testphase/testplan[@href='<test plan resourceUrl>']
Note: This filter property is only supported in RQM 3.0.1.3+.
See https://jazz.net/wiki/bin/view/Main/RqmApi#fields for more details.