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

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

 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 ?


0 votes


Accepted answer

Permanent link

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

1 vote


One other answer

Permanent link
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

0 votes

Comments

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 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,953
× 7,510
× 1,340

Question asked: Jul 11 '22, 9:04 a.m.

Question was seen: 1,385 times

Last updated: Jul 11 '22, 11:21 a.m.

Confirmation Cancel Confirm