How get list of Global Stream present under project area using API
Hello Team,
I am trying to get below 2 things using API
Thank you
|
Accepted answer
David Honey (1.8k●1●7)
| answered Feb 03 '23, 5:16 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited Feb 03 '23, 5:47 a.m. 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.
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
Comments
Rajat Krishnan
commented Feb 03 '23, 6:23 a.m.
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:
Rajat Krishnan
commented Feb 03 '23, 6:42 a.m.
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?
Rajat Krishnan
commented Feb 03 '23, 7:12 a.m.
I have tried below api to get name from configuration uri
https://localhost/rm/localVersioning/configurations?configurationUri=https://localhost/rm/cm/stream/_-2T35nnmEey-HqX-2cUlvA
But problem is above api is private api and my focus is only to stick to public api from IBM
David Honey
commented Feb 03 '23, 7:59 a.m.
| edited Feb 03 '23, 8:02 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Just do a GET on the URI of the configuration with an
Rajat Krishnan
commented Feb 06 '23, 1:31 a.m.
@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
https://localhost/gc/oslc-query/configurations/_7jjZkDMMEeywZ_Gkmfhjbg?oslc.where=rdf%3Atype%3Doslc_config_ext%3ASharedStream&oslc.select=dcterms:title
showing 5 of 6
show 1 more comments
|
2 other answers
David Honey (1.8k●1●7)
| answered Feb 02 '23, 5:13 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Have you looked at https://jazz.net/wiki/bin/view/Deployment/CLMProductAPILanding or https://jazz.net/gc/doc/scenarios?
Comments
Rajat Krishnan
commented Feb 02 '23, 11:38 p.m.
@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:)
Rajat Krishnan
commented Feb 03 '23, 1:57 a.m.
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,...
|
David Honey (1.8k●1●7)
| answered Feb 03 '23, 3:55 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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
url for GC1 is https://localhost/gc/configuration/154
I have also tried to hit an api : https://localhost/gc/configuration/154?oslc.where=rdf:type=oslc_config:Configuration
but it gives only limited information in response for e.g. it does not include information about hierarchy orderĀ tags(RM,CCM)...
|
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.