It's all about the answers!

Ask a question

How to use the DNGTypeImport server API


Ankita M Udyavar (72114) | 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 https://jazz.net/wiki/bin/view/Main/DNGTypeImport 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="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:oslc="http://open-services.net/ns/core#" xmlns:oslc_config="http://open-services.net/ns/config#" xmlns:calm="http://jazz.net/xmlns/prod/jazz/calm/1.0/"

  xmlns:rm="http://www.ibm.com/xmlns/rdm/rdf/" xmlns:jp10="http://jazz.net/xmlns/prod/jazz/process/1.0/" xmlns:dng_config="http://jazz.net/ns/rm/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 >

</rdf:RDF>

 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"?>
<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:types="http://www.ibm.com/xmlns/rdm/types/">
  <types:TypeSystemCopySession>
    <types:target rdf:resource="target stream URI"/>
    <types:source rdf:resource="source stream URI"/>
  </types:
TypeSystemCopySession>
</rdf:RDF>

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 Udyavar selected this answer as the correct answer

Comments
1
Ankita M Udyavar 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.


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.