It's all about the answers!

Ask a question

[GC] How to create a GC baseline for a stream


Chandan M B (11314184) | asked Jul 11 '22, 9:04 a.m.

 Hi,


 Even though I have gone through the scenarios, I am still figuring the out the way to perform OSLC Post call to create a GC baseline.
Could somebody help me to share the example REST URL pattern to create gc baseline ?


Accepted answer


permanent link
David Honey (1.8k17) | answered Jul 11 '22, 11:21 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Jul 11 '22, 11:21 a.m.

The POST is to gcContextRoot/api/createBaseline .

The body is RDF as derscribed on https://jazz.net/gc/doc/scenario?id=CreateBaseline

That page includes an example that shows posted RDF content. Note that the operation returns 202 Accepted with the location of an activity resource. The API page describes this and shows how you can get information about the activity, such as monitoring progress and getting final completion information. This is a fairly standard pattern for long running operations in REST APIs.

There is another way to create a global baseline, but it's not as useful. You can GET the global stream, look at it's baselines LDPC (See the OSLC Configuration Management specification at https://docs.oasis-open-projects.org/oslc-op/config/v1.0/psd01/config-resources.html#shape-stream), then POST the RDF representation of the baseline to be created to that baselines LDPC URI. However, that will only work if the contributions to the stream are already baselines.It's the only OSLC defined mechanism for creating baselines, and it is not a hierarchical operation.

In practice, what is more useful is to perform a hierarchical operation (the same as performed through the GCM web UI) on the global stream, which first creates a global baseline staging stream hierarchy, then attempts to commit it. That's what the API at https://jazz.net/gc/doc/scenario?id=CreateBaseline does..

Chandan M B selected this answer as the correct answer

One other answer



permanent link
David Honey (1.8k17) | answered Jul 11 '22, 10:04 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Have you looked at the GCM public REST API documentation at https://jazz.net/gc/doc/scenarios?
Especially: https://jazz.net/gc/doc/scenario?id=CreateBaseline

Comments
Chandan M B commented Jul 11 '22, 11:06 a.m.

Thanks. I have gone through this link but never got a clear understanding of creation baseline through REST with OSLC (POST body) 

Would be helpful to know
 URL: _

 Body : _

Your answer


Register or 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.