how can we fetch all modules of a project area by using module type as filter using oslc query
how can we fetch all modules of a project area by using module type as filter using oslc query |
Accepted answer
Ian Barnard (1.9k●6●13)
| answered Jan 10 '23, 6:44 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Yes you can query for modules by artifact type like
oslc.where=oslc.instanceShape=<urioftype>
e.g.
oslc.where=oslc:instanceShape=<https://SERVER:PORT/rm/types/OTx7TIEB6Eeuh3Iiax2L3Ow>
This must be URL-encoded in the query URL to e.g.
oslc.where=oslc%3AinstanceShape%3D%3Chttps%3A//SERVER%3APORT/rm/types/OTx7TIEB6Eeuh3Iiax2L3Ow%3E
You'll need to provide prefix definitions for e.g. oslc in the oslc.prefix, of course
You can find the type definitions to find the type url using the configuration-specific services.xml - which is where you find the query capability base URLs - the types are referenced in the query capability and factory definitions.
Refer to this old but relevant article Using OSLC capabilities in the Requirements Management application - Library: Articles - Jazz Community Site
G C selected this answer as the correct answer
Comments Hello Ian
I tried using the below two queries one suggested by you and from the reference document you have asked to refer, but I am getting bad request error.
Can you please let me know where I am doing the mistake
Note : I will replace the serverUrl with my server url
Query 1:
Query 2 :
Ian Barnard
commented Jan 11 '23, 4:14 a.m.
| edited Jan 11 '23, 4:16 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
You shouldn't have " around the URL in e.g.:
If that doesn't fix the bad request problem then also show all the headers you're providing?
Also what version+ifix are you using? There have been defects in the APIs which are resolved in latest ifix so always a good policy to keep using the most recent ifix.
G C
commented Jan 11 '23, 4:22 a.m.
Hello,
Even after removing " I am facing same error
Version we are using -
Headers I am using
G C
commented Jan 11 '23, 6:50 a.m.
working fine after removing ".
Thanks for the help
|
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
Have you read about OSLC Discovery (https://docs.oasis-open-projects.org/oslc-op/core/v3.0/os/discovery.html) and OSLC Query (https://docs.oasis-open-projects.org/oslc-op/query/v3.0/os/oslc-query.html) ?
Those two specifications tell you how to discover an OSLC query capability for querying resources of some RDF type, and then having found one, how to consume it.
A module will have an RDF type of
http://open-services.net/ns/rm#RequirementCollection.
Hello David,