How Do I Query RM for Multiple Artifacts via OSLC based on Artifact GUID?
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
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.
Comments
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.