oslc.searchTerms is not working as expected
jyoti mishra (45●1●48)
| asked Jun 02 '22, 6:05 a.m.
retagged Jun 06 '22, 9:46 a.m. by Ian Barnard (2.3k●7●14) Hello Everyone,
For Searching Test Case/Test Plan by its ID or Title with Wild Card, I have used oslc.searchTerms in the query, but it's behaviour is not consistent. It is working fine in most of the projects, but it is failing in the projects ,which is having more data(2744).I am not sure about the reason, why it is failing for this project. One of the reason could be large data. I have used the below query-
Method:-Post
Header:-Accept:application/rdf+xml
OSLC-Core-Version:2.0
Content-type:application/x-www-form-urlencoded
Query URL:-
https://<server>:<port>/qm/oslc_qm/contexts/<ProjectUUID>/resources/com.ibm.rqm.planning.VersionedTestCase
Body:-
oslc.searchTerms=%222*%22&oslc.select=dcterms%3Atitle,oslc%3AshortId,dcterms%3Aidentifier,dcterms%3Amodified&oslc_config.context=<ConfigUUID>
Authorization:- Bearer token
After running the above query, it is returning only 43 data, but if we search the same (2<asterisk Symbol>) in the application of QM Search box ,it is listing 100 data. I thought, this might be returning data from only first page, so thought to apply pagination, but in the response 'oslc:totalCount' is 43 only. and 'oslc:nextPage' is also not available.
Can you please guide me ,what could be the issue.
Thanks and Regards,
Jyoti
|
One answer
Ralph Schoon (63.7k●3●36●48)
| answered Jun 03 '22, 8:23 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER As far as I can find, the specification https://docs.oasis-open.org/oslc-core/oslc-query/v3.0/csprd01/oslc-query-v3.0-csprd01.html does not mention to send the search terms in the body at all, the search terms are in the URI.
The method GET is also valid and would not even send a request body.
Comments I believe you can use POST and put the query parameters in the body as Jyoti has done. Servers should support POST with a URL form encoded body that represents similar parameters to a GET. It's there in the OSLC query spec.
Interesting. I missed that. Thanks for sharing. |
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.
Comments