It's all about the answers!

Ask a question

Creating multiple artefacts in doors 7.0.2 API/OSLC


Alan Schiffler (13114) | asked Apr 04 '22, 11:05 p.m.

 Hi All,


Currently trying to import multiple artefacts/requirements with a single query, but can't seem to find if this is possible or not.

The below works with 1 Requirement but fails if I try to add another requirement oslc_rm:Requirement rdf:about="">
I'd prefer not to loop through to create them as I could potentially have hundreds of requirements needing creation at once.

Thanks!
Post -> {{doors_uri}}/rm/requirementFactory?projectURL={{doors_uri}}/rm/process/project-areas/{{project_id}}
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
xmlns:rm_property="{{doors_uri}}/rm/types/"
xmlns:rt="{{doors_uri}}/rm/types/"
xmlns:jazz_rm="http://jazz.net/ns/rm#"
>
<oslc_rm:Requirement rdf:about="">
<oslc:instanceShape rdf:resource="{{doors_uri}}/rm/types/{{requirement_type_id}}"/>
<nav:parent rdf:resource="{{doors_uri}}/rm/folders/{{root_folder_id}}"/>
<dc:title>OSLC-001</dc:title>
<dc:description>Created with Postman</dc:description>
<jazz_rm:primaryText rdf:parseType="Literal">
<h2>First Requirement</h2>
</div>
</jazz_rm:primaryText>
</oslc_rm:Requirement>
</rdf:RDF>

Accepted answer


permanent link
Ralph Schoon (63.4k33646) | answered Apr 05 '22, 2:07 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

 For all I know you can only ever create one item using one post to one factory. That is how the OSLC API works.

So, if you want to create multiple items, you have to perform the posts for all of them. 

Alan Schiffler selected this answer as the correct answer

Comments
Alan Schiffler commented Apr 05 '22, 6:30 p.m.

Thank you, I shall do this then :)  

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.