It's all about the answers!

Ask a question

How Do I Query RM for Multiple Artifacts via OSLC based on Artifact GUID?


Nate Decker (37814561) | asked Oct 24 '14, 9:09 a.m.

Historically, most of my API queries within CLM have been to RTC. However, I now have reason to query RM as well. I've been experimenting with the OSLC Queries and have been able to successfully query an RM Project Area for a specific artifact ID (if I know the ID in advance). My further testing has been unsuccessful.

I have two questions:

1) How do I query for an artifact based on its GUID rather than its identifier? I know you could simply use a permalink URL (i.e., https://server:port/rm/resources/GUID), but I don't think that allows me to fetch data for more than a single artifact does it? That brings me to question 2.

2) How do I write an RM OSLC query that includes an "OR" operator. For example, what is the syntax to query for "Artifacts having GUID X or GUID Y"?

Accepted answer


permanent link
Gabriel Ruelas (1.1k13) | answered Oct 27 '14, 8:51 a.m.
Hi,
   GUID's can not be used for generic queries in OSLC, the option is to use ID's, requirement type or some other artifact fields.
Samples on how to use them can be found in : https://jazz.net/library/article/1197
Best Regards.
Nate Decker selected this answer as the correct answer

Comments
Nate Decker commented Oct 27 '14, 2:03 p.m.

That's unfortunate because only the GUID is part of the URL when you have a hyperlink to an artifact. Unlike RTC, the artifact identifier isn't part of that URL so you wouldn't know it in advance. If I have a document with 100 hyperlinks in it, I'd like to be able to write a single query to get information about all 100 artifacts behind those artifacts in a single http request. I don't want to have to query each URL separately.

Fortunately, I think it might be doable to get what I'm after using REST queries instead of OSLC ones. I guess I'll pursue that route.

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.