GC REST API Usage
Accepted answer
If you are using https://jazz.net/gc/doc/scenario?id=QueryConfigurations then that page describes the values you can use for rdf:type
in an olsc.where
expression. If you want to only return shared streams and baseline staging streams, then the query expression should include
rdf:type in [oslc_config_ext:SharedStream, oslc_config_ext:BaselineStagingStream]
.
Remember that parameter values should be encoded, so the request URI would include
?oslc.where=rdf%3Atype%20in%20%5Boslc_config_ext%3ASharedStream%2C%20oslc_config_ext%3ABaselineStagingStream%5D
.
I hope you are using standard OSLC discovery to find the query base URI of a query capability and not constructing the URI yourself.
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
.. <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>
That specific GC only has two RDF types:
- A shared stream is stream that can be used by multiple users for ongoing development work.
- A baseline staging stream is a stream that is used to prepare a baseline and typically becomes a baseline at some point.
- A personal sream is specific to a particular user and is used when working on change sets, especially in DOORS Next.
oslc_config:Stream
. They typically also have additional GCM-specific types to distinguish them.
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.
One other answer
If you're using this scenario Jazz API Usage Scenario: Query for global configurations using LDPCs then note the page says very clearly "... any
oslc.where
parameter in the request is ignored" - so you'll have to filter the results to find the ones you are interested in.
oslc.where=rdf:type in [oslc_config:Stream,oslc_config:Baseline]
* oslc_config_ext:BaselineStagingStream
* oslc_config:Configuration * oslc_config:Stream This means it's returned when you query for rdf:type=oslc_config:Stream, and also when you query for rdf:type=oslc_config:Configuration OSLC Query (the spec itself, i.e. this isn't a limitation or restriction of GCM) doesn't have a 'not in' or 'is not' so you'll have to filter the results to remove the configurations you're not interested in. |