above image shows the format of the module.
Here is the details of the artifact which i want to include inside the above module.
<rdf:RDF
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:oslc_core="http://open-services.net/ns/core#"
xmlns:oslc_config="http://open-services.net/ns/config#"
xmlns:j.0="http://jazz.net/ns/rm/navigation#"
xmlns:nav="http://com.ibm.rdm/navigation#"
xmlns:jazz_rm="http://jazz.net/ns/rm#"
xmlns:rm_types="http://www.ibm.com/xmlns/rdm/types/"
xmlns:process="http://jazz.net/ns/process#">
<jazz_rm:Artifact rdf:about="https://jazz7:9443/rm/resources/TX_MyDtYKs_Ee-jCoWF2gxAeg">
<dcterms:description rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
></dcterms:description>
<oslc_config:component rdf:resource="https://jazz7:9443/rm/cm/component/_OJPkYIZAEe-EhaxT-7FRbA"/>
<jazz_rm:artifactFormat rdf:resource="http://jazz.net/ns/rm/dng/type/format#Text"/>
<process:projectArea rdf:resource="https://jazz7:9443/rm/process/project-areas/_N5Tq8IZAEe-EhaxT-7FRbA"/>
<dcterms:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>process name</dcterms:title>
<dcterms:contributor rdf:resource="https://jazz7:9443/jts/users/aak_adm"/>
<jazz_rm:primaryText rdf:parseType="Literal"><div xmlns="http://www.w3.org/1999/xhtml">
<p id="_1732547341512">process name</p>
</div></jazz_rm:primaryText>
<dcterms:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#integer"
>415</dcterms:identifier>
<dcterms:created rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime"
>2024-11-25T15:09:00.087Z</dcterms:created>
<j.0:parent rdf:resource="https://jazz7:9443/rm/folders/FR_KI2yx4bxEe-GkKV8PcjVhw"/>
<dcterms:creator rdf:resource="https://jazz7:9443/jts/users/aak_adm"/>
<dcterms:modified rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime"
>2024-11-25T15:09:00.087Z</dcterms:modified>
<jazz_rm:artifactType rdf:resource="https://jazz7:9443/rm/types/OT_qcuisIbxEe-GkaV8PcjVhw"/>
</jazz_rm:Artifact>
</rdf:RDF>
i am using PUT method to update the module and it also give the "202 Accepted" status but in the DNG it is not updating anything.
Headers:
DoorsRP-Request-Type:public 2.0
If-Match:"%220%22&_g7VVsKGwEe-Bxfjn_fA72g"
Accept:application/json
Content-Type:application/json
Body :
[
{
"uri": "https://jazz7:9443/rm/resources/MD_cdU5UKGwEe-Bxfjn_fA72g/structure",
"type": "dng_module:Binding",
"component": "https://jazz7:9443/rm/cm/component/_OJPkYIZAEe-EhaxT-7FRbA",
"isStructureRoot": "true",
"isHeading": false,
"module": "https://jazz7:9443/rm/resources/MD_cdU5UKGwEe-Bxfjn_fA72g",
"boundArtifact": "http://www.w3.org/1999/02/22-rdf-syntax-ns#nil",
"childBindings": [
"https://jazz7:9443/rm/resources/BI_g6tqoKGwEe-Bxfjn_fA72g",
"https://jazz7:9443/rm/resources/MB_e34eb5d27c8446c791e72a882d52fd34"
]
},
{
"uri": "https://jazz7:9443/rm/resources/BI_g6tqoKGwEe-Bxfjn_fA72g",
"type": "dng_module:Binding",
"component": "https://jazz7:9443/rm/cm/component/_OJPkYIZAEe-EhaxT-7FRbA",
"isHeading": true,
"module": "https://jazz7:9443/rm/resources/MD_cdU5UKGwEe-Bxfjn_fA72g",
"boundArtifact": "https://jazz7:9443/rm/resources/TX_g7DB0KGwEe-Bxfjn_fA72g",
"childBindings": []
},
{
"uri": "https://jazz7:9443/rm/resources/MB_e34eb5d27c8446c791e72a882d52fd34",
"type": "dng_module:Binding",
"component": "https://jazz7:9443/rm/cm/component/_OJPkYIZAEe-EhaxT-7FRbA",
"isHeading": true,
"module": "https://jazz7:9443/rm/resources/MD_cdU5UKGwEe-Bxfjn_fA72g",
"boundArtifact": "https://jazz7:9443/rm/resources/TX_MyDtYKs_Ee-jCoWF2gxAeg",
"childBindings": []
}
]
Comments
Ian Barnard
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Nov 26 '24, 5:46 p.m.Are you trying to create the artifact and also bind it into a module? Don’t think that will work, also when creating the artifact application/json won’t work (must be RDF), also you need to provide the header OSLC-Core-Version: 2.0 and not the DOORS-RP-Request-Type header. IIRC the module structure API can GET/PUT application/json and you mustn’t provide header OSLC-Core-Version.
Ian Barnard
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Nov 27 '24, 5:09 a.m.Abhi Akbari
Nov 27 '24, 4:06 a.m.Thanks for your quick response. artifact is already created and with this method i am just trying to update the structure of module by adding the artifact to it.
Btw i couldn't find your answer in the above link..can you please send it to me.
Ian Barnard
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Nov 27 '24, 5:11 a.m.Here https://jazz.net/forum/questions/278116/get-module-structure-uri-via-rest-api/278122
Ian Barnard
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Nov 27 '24, 5:16 a.m.Just checked and 202 is success response - why do you think your update is failing?
Ian Barnard
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Nov 27 '24, 5:19 a.m.You need to provide a configuration - see the notes about headers in the answer I linked to.
Abhi Akbari
Nov 27 '24, 5:22 a.m.Because it gives 202 response but when i check on the DNG server it didn't change anything
Abhi Akbari
Nov 27 '24, 5:23 a.m.Because it gives 202 response but when i check on the DNG server it didn't change anything
Ian Barnard
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Nov 27 '24, 3:00 p.m.If you’re not providing an explicit config with the PUT, then perhaps the update is going into the default configuration for your project, have you checked there? It’s in the default component, the Initial Stream.