Task Tracker Successful Completion - How to get stream uri after its created.
I am using the oslc rm apis on my java backend. I have a baseline and wanting to create a stream from it. I send the request to oslc client create a stream and get back a 202 response as expected. Now I am taking that location header for the task tracker. I am polling the task tracker just fine and finally when I get the progress 100 and confirmation that state is COMPLETE/PASS I am now trying to get the url of the stream that was created in that task. In order to do that I am getting 'references' (http://purl.org/dc/terms/references) and successfully getting back the following references string:
"1443a0fa-b8cc-41fa-8a21-df307274a26d"
I am confused now how I can get the url of the stream with that provided string above.
One answer
This is described in the OSLC Configuration Management specification at https://docs.oasis-open-projects.org/oslc-op/config/v1.0/ps01/config-resources.html#longoperations. The
oslc_config:Activity
has the following description for
dcterms:references
. That should be the URI of the created resource. If an application is returning a string rather than a URI, that application is not conformant with the OSLC Configuration Management specification.
A reference to a resource providing more details about the progress or result of the activity. For successful or partially successful operations, thedcterms:referencesproperty MUST be present, providing a link to the primary resource created or affected by the operation [CONFIG-RES-161]. For completely unsuccessful activities, this property may be missing. For activities still in progress, this MAY be a reference to a resource providing further information; which MAY be provided inline [CONFIG-RES-162].