[RM] Creation of Baseline in Non-GC RM Project using OSLC
Hello,
7 answers
POST to what URI? You cannot POST to the stream.
You can only create a baseline by POSTing to the baseline's LDPC of the stream.
So the sequence would be:
- GET the stream
- Extract the URI of the baselines LDPC.
-
Take the RDF from the GET, replace the title and description, remove any
rdf:typeofoslc_config:Stream, add rdf:type ofoslc_config:Baseline. You may also need to addprov:wasDerivedFromto reference the stream URI. The important point here is that you have to POST RDF content that is a valid baseline, including any mandatory properties.POSTing just a title and description may be insufficient.
- POST that RDF to the baselines LDPC URI from step 2.
-
For a 202 response, look at the
Locationheader to get the URI of aoslc_config:Activity. -
Poll that activity with GETs until it is completed. Then look at the information in the completed activity.
Comments
If you have API questions, provide the details of what you have done. Request, URI, headers. Do not expect the forum users to assume stuff from references to other posts. If you are not willing to spend the time creating a useful question, do not hope for a useful answer.
URI : https://xxx/rm/cm/stream/_ovO15tKLEeuaG5VmJAdw1w/baselines
202 Accepted
is the expected response since it is a long running operation.
See https://docs.oasis-open-projects.org/oslc-op/config/v1.0/psd01/config-resources.html#longoperations for further information.
Comments
Your POST body is very sparse. Try doing a GET on the stream you want to create a baseline from, and using the RDF from that with changes to the RDF types, title, description and POST that modified content.
Comments
@Chandan I'm not going to respond to any more posts on this topic until you include the following information:
- The request URI
- The request headers
- The request body
- The response headers
- The response body
But until you provide the above details, it's unlikely anyone is going to help you further.
POST