Is it possible to search for an RRC artifact via REST API using the artifact ID as a parameter?
Hello,
I am using RRC 4.0.0.1 and I am trying to search for an artifact via REST API based on it's ID. This is because the artifacts are referenced by their UUID (for example https://server.com/rm/resources/_vvjWoMz8EeKAvJ3otSDu6Q) and not by their IDs like in RTC.
I would like to pass the ID, find the corresponding UUID and then access the artifact by constructing the URL. Is this possible? Are there any other ways of achieving this?
Thank you in advance,
Andrew
edit: I can construct a query
that searches a project area for an artifact with ID 35, but it returns an error:
Any ideas?
|
Accepted answer
Hi,
That query should work, ensure that you are using the proper OSLC Headers. PLS check for smaples at : https://jazz.net/library/article/1197 Ralph Schoon selected this answer as the correct answer
Comments
Andrew Trobec
commented Jan 29 '14, 2:19 p.m.
Hello Gabriel,
Thank you for the reply!
I checked the articles and now I have the correct headers and now I get the error:
Here is a screenshot of the GET method using RESTClient for Firefox.
Any ideas?
Best regards,
Andrew
Andrew Trobec
commented Jan 29 '14, 2:20 p.m.
Hello Gabriel,
Thank you for the reply!
I checked the articles and now I have the correct headers and now I get the error:
java.lang.RuntimeException: com.hp.hpl.jena.shared.JenaException: org.xml.sax.SAXParseException: Premature end of file. (More info found at entry [85eaa7f3adfb094d] in RRS server log)
Here is a screenshot of the GET method using RESTClient for Firefox.
Any ideas?
Best regards,
Andrew
Gabriel Ruelas
commented Jan 29 '14, 3:51 p.m.
Could you paste the complete URL used for the GET here? Thanks
Donald Nong
commented Jan 29 '14, 11:52 p.m.
A sample URL is like this:
Andrew Trobec
commented Jan 30 '14, 2:08 a.m.
Hello Gabriel, Donald,
Gabriel, the complete URL used for the GET is:
Donald, I used your sample URL but I get the same error. I can get that same resource using the resource URL no problem, and unfortunately I don't have access to the the RRC log files. Also, changing artifact ID gives me the same error.
Thanks again!
Regards,
Andrew
Gabriel Ruelas
commented Jan 30 '14, 11:31 a.m.
Hi,
showing 5 of 6
show 1 more comments
|
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.