How get list of Global Stream present under project area using API
Accepted answer
The RDF representation of a stream is described in .the OSLC Configuration Management specification. See https://docs.oasis-open-projects.org/oslc-op/config/v1.0/ps01/config-resources.html#StreamShape.
Consider the following GC hierarchy:
GC A
GC B
RM Stream1
GC A
will include a contribution from
GC B
. You will not see any reference to
RM Stream 1
there because it is not a direct contribution. So you have to GET the RDF of
GC B
, and there you will see a contribution from
RM Stream 1
.
If you want to get the recursive contributions of a GC, you cannot do that with an OSLC query - it doesn't have a syntax for recursive nested properties. You can do a sequenc of GETs, walking down the hierarchy.
Alternatively, you can use a non-OSLC GC SDK REST API for this - see https://jazz.net/gc/doc/scenario?id=GetFlatListOfContributionsForGcHiearchy.
Comments
2 other answers
Have you looked at https://jazz.net/wiki/bin/view/Deployment/CLMProductAPILanding or https://jazz.net/gc/doc/scenarios?
Comments
oslc.select
specifies what data about each member is returned in the query. If you want to specify a query expression, use
oslc.where
. For example, if you want a query to return only shared streams you might use a query expression such as
rdf:type=oslc_config_ext:SharedStream
. Remember that parameter values need to be URL encoded, so the URI would include
?oslc.where=rdf%3Atype%3Doslc_config_ext%3ASharedStream
. See https://docs.oasis-open-projects.org/oslc-op/query/v3.0/os/oslc-query.html and https://jazz.net/gc/doc/scenario?id=QueryConfigurations for more details.