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

How get list of Global Stream present under project area using API

Hello Team,
I am trying to get below 2 things using API
  • List of Global Streams present under project area
  • List of RM Streams present under Global Stream
Could you please help me here

Thank you

0 votes


Accepted answer

Permanent link

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
The RDF representation of 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.

Note that in either case, you cannot determine which configurations might be from RM. Configuration URIs are opaque and even with DOORS Next, a user might have chosen a context root that was non-standard. For example, instead of "rm" a user could have used "req" so that the context root was, for example, https://localhost:9443/req. You should avoid hard coding assumptions about context roots. If you know the context root of a specific RM server, you could identify which configurations matched that.

Another option is to execute a SPARQL query on a Lifecycle Query Engine SPARQL endpoint where that query uses a recursive SPARQL property path.

Rajat Krishnan selected this answer as the correct answer

1 vote

Comments

With this actually i can get a hierarchy view but problem is i need stream title/name as well but any GC API gives only uri not title

There are only 2 ways of doing that:
  1. Walk down the hierarchy to the leaves, performing an HTTP GET on each configuration.
  2. Use SPARQL on a Lifecycle Query Engine endpoint.
GCM does not know anything about configurations contributed from other servers, such as RM, or QM. All it knows is the URI of the configuration and its corresponding component URI.

Walk down the hierarchy to the leaves, performing an HTTP GET on each configuration : lets say i have configuration URI as https://dngserver.public.name:port/rm/cm/stream/_XYZ,but now the problem is do we have any oslc available to get name out of configuration uri?

I have tried below api to get name from configuration uri

But problem is above api is private api and my focus is only to stick to public api from IBM

Just do a GET on the URI of the configuration with an Accept header with a supported RDF media type. Look at dcterms:title of the RDF returned in the response. As I mentioned previously, 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. You might also want to look at the OSLC Primer at https://open-services.net/resources/oslc-primer/.

@David Honey,
Thank you very much for your time and support, Just whatever i understood by jazz docs and your support, here is what i am concluding maybe any suggestion(if any) here would be appreciated

  • List of Global Streams present under project area
https://localhost/gc/oslc-query/configurations/_7jjZkDMMEeywZ_Gkmfhjbg?oslc.where=rdf%3Atype%3Doslc_config_ext%3ASharedStream&oslc.select=dcterms:title
  • List of RM Streams present under Global Stream
  1. First Get the flat hierarchy List (inorder to get RM Stream URI) : https://localhost/gc/gcsdk-api/flatListOfContributionsForGcHierarchy?configurationUri=localhost/gc/configuration/154
  2. Then hit GET along with Accept header( inorder to get title of RM Stream) : https://localhost/rm/cm/stream/_xlWYhhE1EeyR0LNIOUaIuA

showing 5 of 6 show 1 more comments

2 other answers

Permanent link

Have you looked at https://jazz.net/wiki/bin/view/Deployment/CLMProductAPILanding or https://jazz.net/gc/doc/scenarios?


1 vote

Comments

@David Honey, yes i did went through this wiki docs but was not helpful in my case or maybe i am unable to crack the API formation for my usecase:)

Plus i tried this query

My intention here is to get only shared stream list in response but i am getting all the things like staging baseline stream, shared stream, personal stream,...


Permanent link

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.

1 vote

Comments
@David Honey, thanks for info but i am able to crack API to get list of Global Stream but still i am finding difficult to find list of RM Stream present under Global Stream
Please refer the image, now my exceptation is to get below output
Stream3

A

B
C
D
E
F
G
H

but it gives only limited information in response for e.g. it does not include information about hierarchy orderĀ  tags(RM,CCM)...

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,497
× 1,327

Question asked: Feb 02 '23, 2:07 a.m.

Question was seen: 1,512 times

Last updated: Feb 06 '23, 1:31 a.m.

Confirmation Cancel Confirm