Is there a REST API for DNG to create a local stream,component and baseline?
Accepted answer
Here is an example of how to create a component via OSLC:
1) GET /rm/oslc_config
2) In this document, find the oslc:ServiceProvider entry, it should be something like <server>/rm/oslc_config/components
3) GET on the URL found in step 2
4) This gives you the service provider document. In here you need to find the oslc:CreationFactory entry. On my server the URL is /rm/cm/component/ldpc?project=<UUID>. You will have one of these entries for each project area.
5) POST to the appropriate URL from step 4 for the project area where you want to create a component.
Request headers:
OSLC-Core-Version: 2.0
Content-Type: application/rdf+xml
Request body:
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:jfs="http://jazz.net/xmlns/foundation/1.0/"
xmlns:acc="http://open-services.net/ns/core/acc#"
xmlns:rmTypes="http://www.ibm.com/xmlns/rdm/types/"
xmlns:process="http://jazz.net/ns/process#"
xmlns:rmWorkflow="http://www.ibm.com/xmlns/rdm/workflow/"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:h="http://www.w3.org/TR/REC-html40"
xmlns:xs="http://schema.w3.org/xs/"
xmlns:oslc="http://open-services.net/ns/core#"
xmlns:oslc_config="http://open-services.net/ns/config#">
<oslc_config:Component>
<dcterms:title rdf:parseType="Literal">Create Via OSLC</dcterms:title>
<dcterms:description rdf:parseType="Literal">Test description</dcterms:description>
</oslc_config:Component>
</rdf:RDF>
You can do a GET on an existing component to see an example representation.
3 other answers
DNG supports OSLC Configuration Management for creation of streams, components, and baselines. See https://<servername>:<port>/rm/oslc_config for details. You can also look at https://tools.oasis-open.org/version-control/browse/wsvn/oslc-core/trunk/specs/config/oslc-config-mgt.html for the latest details of the spec.
Comments
1 vote
Comments
Thomas Kirstätter
Feb 08 '18, 1:49 a.m.