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

Is there a REST API for DNG to create a local stream,component and baseline?

Could you please help on the availability of REST API for DNG?the need is to create a local stream,component and baseline using the REST API in DNG

1 vote

Comments

Hint: We currently use CLM 6.0.4


Accepted answer

Permanent link

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.

Rosa Naranjo selected this answer as the correct answer

0 votes

Comments

I was able to create the FGC component with the help of above steps.
thank you so much!!!


3 other answers

Permanent link

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.

0 votes

Comments

Hello Brian,
Is this true for DNG 6.0.4, or only 6.0.5?

This API was introduced in CLM 6.0.4, see this post on news and noteworthy for Jazz Foundation 6.0.4 - REST services API, and extended with CLM 6.0.5 as mentioned here.

We are having difficulties creating components in DNG, is there any example code that works with 6.0.4 which we could look at to get some better understanding?

Find the details on how we created a Stream from baseline in RM
 Create Stream:
  URL : https://SERVER:PORT/rm/localVersioning/configurations/streams
 
  Request header :
  vvc.configuration: https://SERVER:PORT/rm/cm/stream/_zJk0UPHVEee5lKtCF40vKnm
  Accept: application/json
  Content-Type: application/json
  X-Jazz-CSRF-Prevent : Session ID
 
  Request body:
  {"name":"Test Stream","description":"test stream","configurationId":"https://SERVER:PORT/rm/cm/baseline/_q6yh8CHNEeiZ4ZpHAw7JUA"}

But we are not able to create a stream directly without taking a baseline.
Similarly component creation also not there

1 vote

Requiring that there be a baseline upon which a new stream is based is what I would expect.   I will ping the development team for an example on how to create a new component.


Permanent link

Hello,
Similar to RM local stream creation, are there any API to create local Streams for fine grained components in RQM?

0 votes


Permanent link
Hi,
This was useful, I was able to create a baseline.
 

Can I use this procedure to archive a baseline by simply doing a HTTP Delete instead of POST on the resource, without body?

0 votes

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,937
× 1,700

Question asked: Feb 06 '18, 5:02 a.m.

Question was seen: 6,139 times

Last updated: Nov 14, 9:52 a.m.

Confirmation Cancel Confirm