Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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:dcterms="http://purl.org/dc/terms/"
    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):

<rdf:RDF
    xmlns:dcterms="http://purl.org/dc/terms/"
    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

0 votes



One answer

Permanent link

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.

1 vote

Comments

The directly relevant part of the OSLC Configuration Management 1.0 standard is here: https://docs.oasis-open-projects.org/oslc-op/config/v1.0/os/config-resources.html#creation


Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 527
× 32

Question asked: Apr 03 '25, 7:21 a.m.

Question was seen: 2,320 times

Last updated: Apr 04 '25, 9:08 a.m.

Confirmation Cancel Confirm