[GC] How to create a GC baseline for a stream
![](http://jazz.net/_images/myphoto/48ec91c4f8003efbae12810e8a116267.jpg)
Accepted answer
![](http://jazz.net/_images/myphoto/48ec91c4f8003efbae12810e8a116267.jpg)
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..
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..
One other answer
![](http://jazz.net/_images/myphoto/48ec91c4f8003efbae12810e8a116267.jpg)
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
Especially: https://jazz.net/gc/doc/scenario?id=CreateBaseline