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

How to use DNG ReqIf api for creating REQIFDEFINITION which includes artifacts or module/views.

 I have tried using below api for creating reqif definition




METHOD: POST

REQUEST HEADER:
Accept: application/rdf+xml
Oslc-Core-Version: 2.0
Content-Type: application/rdf+xml

REQUEST BODY:

 <rdf:RDF 
<dng_reqif:ReqIFDataDefinition rdf:about="">
<dcterms:title>test_ReqIfDefinition</dcterms:title>
<dcterms:description></dcterms:description>
<dcterms:identifier></dcterms:identifier>
<dng_reqif:include rdf:parseType="Resource">
<dng_reqif:ViewDefinitionSelection rdf:parseType="Resource">
<dng_reqif:module rdf:resource="https://localhost:9443/rm/resources/AIYDc16sEeqZK_TySw08xg"/>
<dng_reqif:view rdf:resource="https://localhost:9443/rm/views/-N-BUWqVEeqGiqHth5VF3w"/>
</dng_reqif:ViewDefinitionSelection>
</dng_reqif:include>
</dng_reqif:ReqIFDataDefinition>
</rdf:RDF>

RESPONSE BODY:

<rdf:RDF
    xmlns:dcterms="http://purl.org/dc/terms/"
    <rmReqIF:ReqIFDataDefinition rdf:about="https://localhost:9443/rm/reqif/_A6YmwXfoEeqGiqHth5VF3w">
        <rmReqIF:includeTags rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean"
    >true</rmReqIF:includeTags>
        <dcterms:description rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
    ></dcterms:description>
        <rmReqIF:includeLinks rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean"
    >true</rmReqIF:includeLinks>
        <dcterms:identifier>_8564859e-4e64-4d81-943d-7ea909342a87</dcterms:identifier>
        <dcterms:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
    >test_ReqIfDefinition</dcterms:title>
        <rmReqIF:includeFolders rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean"
    >true</rmReqIF:includeFolders>
        <rmReqIF:preserveReqIFIdentifiers rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean"
    >false</rmReqIF:preserveReqIFIdentifiers>
        <rmReqIF:isMigration rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean"
    >false</rmReqIF:isMigration>
    </rmReqIF:ReqIFDataDefinition>
</rdf:RDF>


This API call creates the REQIF definition without the viewdefinitionselection which is specified in request body.

Questions:
1. Is the request body for specifying view in ReqIfDefinition correct?
2. Can someone provide the sample request body creating reqIFDefinition which include artifact and modules/view.

0 votes



One answer

Permanent link
Hi Karandeep,
I wonder if you've tried first creating the ReqIF definition from the UI where the View is defined, and from there, do an HTTP GET to obtain the ReqIF definition?
To get the list of ReqIF definitions do a GET to https://<server>:<port>/rm/reqif/definitions?resourceContext=https://<server>:<port>/rm/rm-projects/<project_uuid>/components/<component_uuid>, find the ReqIF definition which includes the view, and then do another GET to the selected definition, so you can use this as a reference of what's required for the RDF to include for the view creation.

The ReqIF API documentation is available here: https://jazz.net/wiki/bin/view/Main/DNGReqIF

0 votes

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
× 144
× 40

Question asked: Apr 06 '20, 5:56 a.m.

Question was seen: 2,500 times

Last updated: Jul 01 '20, 3:34 a.m.

Confirmation Cancel Confirm