Trying to create a Configuration/Component in ETM using OSLC
I have tried to create a Configuration and a component in IBM ETM using OSLC, but I'm getting a 400 error. Can anyone tell me what I'm missing?
The xml body I used for creating a component is:
<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:process="http://jazz.net/ns/process#">
<oslc_config:Component>
<oslc:serviceProvider rdf:resource="https://[url]/qm/oslc_config/serviceProviders/configuration"/>
<dcterms:title rdf:parseType="Literal">Created Component Via OSLC</dcterms:title>
<process:projectArea rdf:resource="https://[url]/qm/process/project-areas/_1YGr4MvhEe-eEq2Ib3Kknw"/>
<oslc:instanceShape rdf:resource="https://[url]/qm/oslc_config/resourceShapes/com.ibm.team.vvc.Component"/>
<rdf:type rdf:resource="http://open-services.net/ns/config#Component"/>
</oslc_config:Component>
</rdf:RDF>
I sent a POST request to the creationFactory URL I got from the configuration catalog - https://[url]/qm/oslc_config/resources/com.ibm.team.vvc.Component
This is the body I used to create a Configuration (a Stream):
I sent a POST request to the creationFactory URL I got from the configuration catalog - https://[url]/qm/oslc_config/resources/com.ibm.team.vvc.Component
This is the body I used to create a Configuration (a Stream):
<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:process="http://jazz.net/ns/process#">
<oslc_config:Stream>
<dcterms:title rdf:parseType="Literal">Title of the Stream</dcterms:title>
<oslc_config:component rdf:resource="https://[url]/qm/oslc_config/resources/com.ibm.team.vvc.Component/_1-JYMMvhEe-eEq2Ib3Kknw"/>
</oslc_config:Stream>
</rdf:RDF>
Its clear from the 400 response code that I'm missing something.
Additionally are there any sample request code I can refer to? Any help is appreciated, Thanks
Its clear from the 400 response code that I'm missing something.
Additionally are there any sample request code I can refer to? Any help is appreciated, Thanks
One answer
Not sure about ETM but in DOORS Next to create a stream you POST to the baseline it's to start from - so you probably first need to create a baseline in your initial stream. At least in DOORS Next UI when you create a stream when already in a stream the UI will helpfully create a baseline in the current stream and the new stream from that baseline. Not so in the APIs, you have to do that work.
Manually create a stream, then GET it to see the RDF which is what you'll basically have to provide in the POST.