It's all about the answers!

Ask a question

How to query RDNG artifacts base on their type?


Dinyo Dinev (311234) | asked Aug 20 '15, 9:50 a.m.
edited Aug 20 '15, 9:51 a.m.
 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?

Accepted answer


permanent link
Donald Nong (14.5k614) | answered Aug 21 '15, 5:16 a.m.
edited Aug 21 '15, 5:19 a.m.
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

Comments
Dinyo Dinev commented Aug 21 '15, 7:33 a.m.

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

Your answer


Register or 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.