Getting all the Global Configurations in which a stream is used in using OSLC
Hello all,
I want to get the list of Global Configurations in which a stream (local config) is used in using OSLC API.
In the web UI this is possible using the option "Find Where Used":
Based on the GC OSLC query capabilities documentation from here I've tried to construct the URL.
This is what I have until now:
GET https://server:port/gc/oslc-query/configurations?oslc_config:contribution{oslc_config:configuration{dcterms:itentifier="local_config_identifier"}}
headers: Accept:application/rdf+xml, OSLC-Core-Version:2.0
I also encoded the parameter, but it does not find any match for the specified identifier. I cannot figure out what is missing.
Any help would be much appreciated.
Thanks in advance,
Ana
Accepted answer
Hi Ana
I tried this on 7.0.2 iFix025 although I've no reason to suppose it won't work on 7.0.1 and probably 7.x
The GC OSLC Query API is documented here Jazz API Usage Scenario: Query for global configurations - you need to use the global query because you want to look for configurations in any project. NOTE this may consume server resources so ensure your usage isn't impacting on other users or the overall load on the server.
Using:
- oslc.where=oslc_config:contribution{oslc_config:configuration=<https://jazz.ibm.com:9443/rm/cm/stream/_dNpoIFEfEe2d5dG-54qhbg>}
(with the bold part URL encoded) gives me two results for an RM stream that is contributing to two GC streams, i.e. as expected.
Headers:
- Accept: application/rdf+xml
- OSLC-Core-Version: 2.0
NOTE there's no need to provide oslc.prefix for prefixes dcterms and oslc_config
My final query URL (with the query parameter value URL encoded) is:
HTH
Ian
Comments
Ian Barnard
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Oct 30 '23, 5:06 a.m.Not sure how you got the syntax for the query parameter oslc_config:contribution{oslc_config:configuration{dcterms:itentifier="local_config_identifier"}} - can you point at an example where exactly that syntax is used? And maybe it's a typo but I'd expect dcterms:identifier not dcterms:itentifier.
Ana-Maria Rosu
Oct 30 '23, 9:20 a.m.Yes, indeed. It was a typo from me, but even with the correction, this first version of the query was working.