Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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.

0 votes



2 answers

Permanent link

Peer advice:


If you want to use OAuth-authorized queries, it is cleaner to have the component and configuration URIs in the Headers rather than in the URL query parameters.

The following uses Basic Authentication to simplify illustrating the protocol when Headers are used. Note, too, that the projectURL is a query parameter because that is how Jazz publishes the queryBase out of its QueryCapability for the Service that the RM ServiceProvider offers for querying Requirements.
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

1 vote


Permanent link

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.

0 votes

Your answer

Register or log in to post 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,935

Question asked: Feb 27 '17, 2:16 p.m.

Question was seen: 4,377 times

Last updated: Aug 19 '17, 7:05 p.m.

Confirmation Cancel Confirm