It's all about the answers!

Ask a question

How to use the DNGTypeImport server API

Ankita M U (404) | asked Apr 19 '18, 2:16 a.m.

Hi ,

My use case is that i need to import the project properties from one project area to another. I assume is for this purpose.
I read through the document but i am not able to understand what needs to be the URI.

Has any one tried it out or any idea on it. Any help is welcomed.

I tried the below request:

Request headers:

 1)     Accept: application/rdf+xml

2)     Content-type : application/rdf+xml

3)     vvc.configuration of target stream

4)     DoorsRP-Request-Type : public 2.0


Request body:

 <rdf:RDF xmlns:rdf="" xmlns:dcterms="" xmlns:oslc="" xmlns:oslc_config="" xmlns:calm=""

  xmlns:rm="" xmlns:jp10="" xmlns:dng_config="">

 <oslc:ServiceProvider rdf:about="https://localhost:9443/rm/oslc_rm/_vpUPECKoEeimVdZyCppSEw/services.xml">

            <oslc_config:source rdf:resource="https:// localhost:9443/rm/cm/stream/_3SWrQByNEeimVdZyCppSEw"/>

            <oslc_config:target rdf:resource="https:// localhost:9443/rm/cm/stream/_vtoHViKoEeimVdZyCppSEw"/>

</oslc:ServiceProvider >


 Request uri:   https://localhost:9443/rm/type-system-copy-sessions

 Response:   Source or Target configuration missing from request body

Accepted answer

permanent link
Brian Steele (562) | answered Apr 23 '18, 10:49 a.m.

Hi Ankita,  You have the correct request uri and headers, but you need a slightly different request body.
It should look something like this for DOOS Next Generation 6.0.5.

<?xml version="1.0" encoding="UTF-8"?>
    <types:target rdf:resource="target stream URI"/>
    <types:source rdf:resource="source stream URI"/>

We made a mistake with the naming of this, so what's documented on the wiki is what will actually work with v6.0.6 and later.  Really the only difference you'll notice is that rather than type-system-copy-sessions the URL will end with type-import-sessions, and the <types:TypeSystemCopySession> tag in the POST body will be <types:TypeImportSession>

Ankita M U selected this answer as the correct answer

Ankita M U commented May 02 '18, 10:39 a.m.

Thank you. The import of the properties works now.

Your answer

Register or to post your answer.