How to query RDNG 6.0.3 for requirement collections belonging to a specific component through OSLC?
I'm using /rm/views?oslc.query=true&projectURL={ptojectURL}oslc.prefix=rdf%3D%3Chttp%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%3E&oslc.select=*&oslc.where=rdf:type%3D%3Chttp%3A%2F%2Fopen-services.net%2Fns%2Frm%23RequirementCollection%3E to query for requirement collections. This returns all the requirements collections for the default component on the project. How do I query for requirement collections on a non-default component?
I've tried adding request parameter componentURI={componentURI} or adding query parameter oslc.where=oslc_config:component={componentURI} or adding net.jazz.jfs.owning-context:{componentURI} request header and none of them returns the correct results.
2 answers
Peer advice:
curl "https://my.jazz.com:9443/rm/views?oslc.pageSize=1000&projectURL=https:%2F%2Fmy.jazz.com:9443%2Frm%2Fprocess%2Fproject-areas%2F_RLZ4wHeOEeeoZrT-a32lmA&oslc.select=*&oslc.paging=true&oslc.query=true" \ -H "oslc_config.context: https://my.jazz.com:9443/rm/cm/stream/_RRn1gHeOEeeoZrT-a32lmA" \ -H "OSLC-Core-Version: 2.0" \ -H "componentURI: https://my.jazz.com:9443/rm/cm/component/_RRerkHeOEeeoZrT-a32lmA" \ -H "Cookie: JAZZ_AUTH_TOKEN=1e24af6a07e0483d994a309c6cca2a52&ksHsUqAl39VKdPUNL3TSdCQfgCXmFf0E3R1cgVEqL0; JSESSIONID=0000AKn99IfRwKoFvCdGwMusSoq:5ba41f4b-bd82-4acc-af2d-6a7c7a643bf0; LtpaToken2=AKcriCz3xWsaYKvAV5T0tOTkfabTkQ6+ajBzMVRs6pWPOpKsE0cl/mKmOZFQJhFYPnGH1yfwvqNfG9o6P49Ij1xRZqTXYCnkX3EMjjz8KTRe34TD2jmylszORNyn3keqft7epKDzrBZz63wQJ0ig6JKwqJIH5Cz5uCW3oigc0ops++Jg/Cm56Xmvc5Z6wIBvkExXJhwWibF8mznD+HcF6sy4fvAxAfXH7Xas5EOUBKQruokCFQNeJc6pE60mO6SN4mfcRWWl+GeCDvAGjqjjV+3M2r2oElpzsRqyQcjMUIS/GjnWwXQqL/df7d4grA9E" \ -H "Accept: application/rdf+xml" \ -u user:password
If you are querying for a non-default component, you need the local configuration as well. If fact, since the local configuration is sufficient to get the artifacts you want, you can simply skip the component.
One interesting observation - if I put projectURL, componentURI and oslc.configuration all together in the OSLC query, the query result will show all three of them in the <rdf:Description>. If I put only projectURL and componentURI (without oslc.configuration), the result will only shows projectURL and componentURI is gone, and that is why you see the artifacts in the default component (and the default configuration).
I am not sure whether the last bit is a defect. You can contact Support for this.