Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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



0 votes

Comments

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.


Not sure if what you are trying to do is possible but from here I'd expect the syntax for the parameter to be something more like oslc.where=oslc_config:contribution{oslc_config:configuration{dcterms:identifier="local_config_identifier"}} (with the bold part URL encoded) and I expect you'll have to use oslc.prefix to define the oslc_config and probably the dcterms prefixes.

Yes, indeed. It was a typo from me, but even with the correction, this first version of the query was working. 


Accepted answer

Permanent link

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:
(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

Ana-Maria Rosu selected this answer as the correct answer

2 votes

Comments

Hi Ian,


I just tried this now and it works. I also used the documentation you referred to (minus the typo which was a mistake from my side).

Thank you very much for your support.

Best regards,
Ana

Your answer

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

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,938
× 7,495
× 1,325
× 33
× 8

Question asked: Oct 27 '23, 6:46 a.m.

Question was seen: 737 times

Last updated: Oct 30 '23, 9:20 a.m.

Confirmation Cancel Confirm