GC REST API Usage
Hello Team,
i am referring the GC Scenarios given based on
i have fired the below query for a given project area and getting all the GC releted data (staging,personal streams..,)
my usecase: Get the GC configurations only not personal streams, Staged baselines..of given project area
i have come across parameter like rdf:type which can be added where condition. unfortunately cannot succeed there.
Can you provide same sample for the same?
below is the url i have fired
and do you have documentation on the content retrieved?
|
Accepted answer
David Honey (1.8k●1●7)
| answered Jan 11 '23, 8:39 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited Jan 11 '23, 8:53 a.m. If you are using https://jazz.net/gc/doc/scenario?id=QueryConfigurations then that page describes the values you can use for vinitha dsouza selected this answer as the correct answer
Comments OP wants everything except staging baselines and personal streams :-( I'm sure they can figure this out for themselves based on the above examples and the API doc page. :-)
The syntax of oslc.where is described in https://docs.oasis-open-projects.org/oslc-op/query/v3.0/os/oslc-query.html#oslc.where
vinitha dsouza
commented Jan 12 '23, 9:38 a.m.
thanks for the input.in the response what shall be used to differentiate that this is staging baseline/stream.., i see one item has so many rdf types how to figure out
<rdf:Description rdf:gnout="https://alm-q.de.x.com/gc/configuration/153">
.. <oslc_config:component rdf:resource="https://alm-q.de.x.com/gc/component/23" /><oslc_config:accepts rdf:resource="http://open-services.net/ns/config#Configuration" /><oslc_config:baselines rdf:resource="https://alm-q.de.x.com/gc/configuration/153/baselines" /> .. <oslc_config:contribution rdf:resource="https://alm-q.de.x.com/gc/part/1082" /> <oslc_config:contribution rdf:resource="https://alm-q.de.x.com/gc/part/1083" />..<oslc_config:contribution rdf:resource="https://alm-q.de.x.com/gc/part/1081" />..<rdf:type rdf:resource="http://jazz.net/ns/config_ext#SharedStream" /><rdf:type rdf:resource="http://open-services.net/ns/config#Stream" /> <dcterms:subject>platform/gen15</dcterms:subject></rdf:Description>
vinitha dsouza
commented Jan 12 '23, 9:40 a.m.
By the way, i do not understand difference between Shared streams and Streams?
the terminology used to what i see in the UI.
in addition what exactly is accepted by , accepts in the xml definition
I would be glad if you shown some help that mapping to What is see in GC UI and to response.
David Honey
commented Jan 12 '23, 9:45 a.m.
| edited Jan 12 '23, 9:55 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
That specific GC only has two RDF types:
#1 is a GC specific type.
#2 is a general OSLC Configuration Management type.
The concepts of streams and baseliens are defined by OSLC Configuration Management. More information can be found at https://docs.oasis-open-projects.org/oslc-op/config/v1.0/ps01/oslc-config-mgt.html.
In GCM, there are several sub-types of streams:
oslc_config:Stream
. They typically also have additional GCM-specific types to distinguish them.
vinitha dsouza
commented Jan 20 '23, 6:14 a.m.
It is rather confusion to me now.
Can you help me with an example,
1. how can i query all the GC configurations of given project area.
2. From the response, what is fool proof way to identify the GC configurations only not Staging baseline streams,personal streams (i.e an element to distinguish this).
3. Docu that help me to understand that overall the Response (I see lot of content cannot actually understand the relation ship), would be glad some high level information
David Honey
commented Jan 20 '23, 7:02 a.m.
| edited Jan 20 '23, 7:40 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Use the OSLC query capability for the project area of interest and for configurations. This is all described in https://jazz.net/gc/doc/scenario?id=QueryConfigurations.That page includes 3 examples that show the response.
You can distinguish types of configurations by looking at the
rdf:type
values for each. Or if you only want to query for certain types, you can include that in your
oslc.where
query expression. I already gave an example of that in an earlier post.
For general information about OSLC query, see https://docs.oasis-open-projects.org/oslc-op/query/v3.0/os/oslc-query.html.
showing 5 of 9
show 4 more comments
|
One other answer
Ian Barnard (2.3k●7●14)
| answered Jan 11 '23, 8:07 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited Jan 11 '23, 8:39 a.m. If you're using this scenario Jazz API Usage Scenario: Query for global configurations using LDPCs then note the page says very clearly "... any
Or if using this scenario Jazz API Usage Scenario: Query for global configurations then you may be able (I haven't tested htis) to be more selective by using:
Ah yes I see that a staging baseline is also (quite reasonably) a stream and a configuration - this is what is returned for rdf:type:
I believe this topic of 'not' is being actively discussed, perhaps @davidhoney can add something about that?
|
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.