How to use the DNGTypeImport server API
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
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.
<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>