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

How to query RDNG artifacts base on their type?

 Hi. I am using Jazz Team Server Location        Version          6.0.1 M2 and I tries to query artifacts base on their type using REST API on the Server but I cat make the right URI.

I get the base URI:
baseURL=https://<ip>:<port>9443/rm/views?oslc.query=true&projectURL=https%3A%2F%2F<ip>%3Aport%2Frm%2Fprocess%2Fproject-areas%2F_Agw1YEA_EeW98vRsdfPEQ
so to make the query I have to append the filter. First I get the type base on the instanceShape:
 <oslc:instanceShape rdf:resource="https://<ip:port>/rm/types/_opYnsUasdL2aNIq4SA-w"/>
and construct the filter

&oslc.prefix=rm=http://www.ibm.com/xmlns/rdm/rdf/&oslc.select=*&oslc.where=rm:ofType=https://<ip:port>/rm/types/_opYnsUasdL2aNIq4SA-w
And the final get is:
baseQuery+filter
https://<ip>:<port>9443/rm/views?oslc.query=true&projectURL=https%3A%2F%2F<ip>%3Aport%2Frm%2Fprocess%2Fproject-areas%2F_Agw1YEA_EeW98vRsdfPEQ&oslc.prefix=rm=http://www.ibm.com/xmlns/rdm/rdf/&oslc.select=*&oslc.where=rm:ofType=https://<ip:port>/rm/types/_opYnsUasdL2aNIq4SA-w
But nothing happens? Where is my mistake?

0 votes


Accepted answer

Permanent link
I suggest you read the below article carefully as it has the exact sample.
https://jazz.net/library/article/1197

Both the "rm:ofType" and "oslc:instanceShape" filters work for me on RNDG 5.0.2 and 6.0. The complete OSLC query filter (appending to the base URL) should look like


Not quite sure whether it is the forum messing up your post, but your URL appears to be missing the angle brackets for both "oslc.prefix" and "olsc.where".
Dinyo Dinev selected this answer as the correct answer

0 votes

Comments

OO I take the code from article 1197 but missed the "<". Thanks @Donald Nong.

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
× 12,023

Question asked: Aug 20 '15, 9:50 a.m.

Question was seen: 2,596 times

Last updated: Aug 21 '15, 7:33 a.m.

Confirmation Cancel Confirm