It's all about the answers!

Ask a question

How to get linked artifacts from another artifact using DNG API for 7.0.2 version


CLM _User (2115) | asked Jul 06 '22, 4:24 a.m.
edited Jul 06 '22, 4:41 a.m.

 Hi Team,


How to get linked artifacts from another artifact using DNG  API for 7.0.2 version.
I tried below request


but getting below response

Error 403: Forbidden CRRRS4142E getInternalRequestHandlerService(context) returned null. This error used to report 'The requested service requires a private header'.

Can you please anyone suggest for 7.0.2 version.

Requirements Management/7.0.2


Comments
Ralph Schoon commented Jul 06 '22, 4:37 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

For all I can tell, that is not an OSLC API. The error message indicates it is an internal API. 


CLM _User commented Jul 06 '22, 4:43 a.m.

 Thanks Ralph, I corrected it, can please help me what going wrong here, same API working for 6.0.6 version.

2 answers



permanent link
Ian Barnard (1.9k613) | answered Jul 06 '22, 7:53 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Private APIs are subject to change, as you've discovered.

Let's look at some approaches using public APIs.

You can use OSLC Query to find artifacts (using e.g. the artifact type or perhaps identifier(s) you're interested in)  - and include the Satisfies link in the results by specifying it in the oslc.select parameter. For example this query for a specific identifier 3914 with oslc.select including the component-specific Satisfies link:


GET /rm/views?oslc.pageSize=200&oslc.paging=true&oslc.prefix=dcterms%3D%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Fterms%2F%3E%2Crp0%3D%3Chttps%3A%2F%2Fjazz.ibm.com%3A9443%2Frm%2Ftypes%2F%3E%2Crm_nav%3D%3Chttp%3A%2F%2Fjazz.net%2Fns%2Frm%2Fnavigation%23%3E&oslc.query=true&oslc.select=rp0%3A_OAAJadcLEeqXpuBdEolY7w%2Cdcterms%3Aidentifier%2Crm_nav%3Aparent&oslc.where=dcterms%3Aidentifier%3D3914&projectURL=https%3A%2F%2Fjazz.ibm.com%3A9443%2Frm%2Fprocess%2Fproject-areas%2F_NDNJ0NcLEeqXpuBdEolY7w HTTP/1.1

headers:
  • OSLC-Core-Version: 2.0
  • Accept: application/rdf+xml

returns results including the target of the link, in this this outgoing link is from a module reuse of the artifact id 3914 so there are two results. The core artifact result includes rm_nav:parent, the module reuse of it doesn't:

<rdf:RDF xmlns:rrmNav="http://com.ibm.rdm/navigation#"
    xmlns:jazz_rm="http://jazz.net/ns/rm#"
    xmlns:oslc_rm="http://open-services.net/ns/rm#"
    xmlns:dcterms="http://purl.org/dc/terms/"
>
        <dcterms:title>Query Results: 2</dcterms:title>
    </oslc:ResponseInfo>
        <rdfs:member>
            <oslc_rm:Requirement rdf:about="https://jazz.ibm.com:9443/rm/resources/_OBCrbtcLEeqXpuBdEolY7w">
                <nav:parent rdf:resource="https://jazz.ibm.com:9443/rm/folders/_OAAJVtcLEeqXpuBdEolY7w"/>
                <dcterms:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">3914</dcterms:identifier>
            </oslc_rm:Requirement>
        </rdfs:member>
        <rdfs:member>
            <oslc_rm:Requirement rdf:about="https://jazz.ibm.com:9443/rm/resources/_OA46KtcLEeqXpuBdEolY7w">
                <rt:_OAAJadcLEeqXpuBdEolY7w rdf:resource="https://jazz.ibm.com:9443/rm/resources/_OAvwUdcLEeqXpuBdEolY7w"/>
                <dcterms:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">3914</dcterms:identifier>
            </oslc_rm:Requirement>
        </rdfs:member>
     </rdf:Description>
</rdf:RDF>. 

Or if you have the URI of an artifact then an OSLC GET on that contains outgoing links looking like this:


headers:
  • OSLC-Core-Version: 2.0
  • Accept: application/rdf+xml
result:

<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:acp="http://jazz.net/ns/acp#" xmlns:public_rm_10="http://www.ibm.com/xmlns/rm/public/1.0/" xmlns:calm="http://jazz.net/xmlns/prod/jazz/calm/1.0/" xmlns:jazz_rm="http://jazz.net/ns/rm#" xmlns:acc="http://open-services.net/ns/core/acc#" xmlns:process="http://jazz.net/ns/process#" xmlns:rm_property="https://jazz.ibm.com:9443/rm/types/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:oslc="http://open-services.net/ns/core#" xmlns:nav="http://jazz.net/ns/rm/navigation#" xmlns:oslc_config="http://open-services.net/ns/config#" xmlns:oslc_rm="http://open-services.net/ns/rm#" xmlns:dng_task="http://jazz.net/ns/rm/dng/task#" xmlns:rm="http://www.ibm.com/xmlns/rdm/rdf/" xmlns:oslc_auto="http://open-services.net/ns/auto#"> 
    <rdf:type rdf:resource="http://jazz.net/ns/rm#Text"/>
    <dcterms:title rdf:parseType="Literal">Information captured via the handheld device shall be downloadable via either cable hookup or wireless signal.</dcterms:title>
    <jazz_rm:primaryText rdf:parseType="Literal"><div xmlns="http://www.w3.org/1999/xhtml">
<div> <p id="_20"> <span style="font-family: arial,sans-serif; font-size: 10.0pt; ">Information captured via the handheld device shall be downloadable via either cable hookup or wireless signal.</span></p></div>
</div></jazz_rm:primaryText>
    <rm_property:_OAJ6W9cLEeqXpuBdEolY7w rdf:resource="https://jazz.ibm.com:9443/rm/types/_OBCradcLEeqXpuBdEolY7w#_OBCratcLEeqXpuBdEolY7w"/>
    <rdf:type rdf:resource="http://open-services.net/ns/rm#Requirement"/>
    <rm_property:_OAJ6YdcLEeqXpuBdEolY7w rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">false</rm_property:_OAJ6YdcLEeqXpuBdEolY7w>
    <dcterms:creator rdf:resource="https://jazz.ibm.com:9443/jts/users/ibm"/>
    <oslc:instanceShape rdf:resource="https://jazz.ibm.com:9443/rm/types/_OA46e9cLEeqXpuBdEolY7w"/>
    <rm_property:_OAAJadcLEeqXpuBdEolY7w rdf:resource="https://jazz.ibm.com:9443/rm/resources/_OAvwUdcLEeqXpuBdEolY7w"/>
    <rm_property:_OAJ6XNcLEeqXpuBdEolY7w rdf:resource="https://jazz.ibm.com:9443/rm/types/_OBCrVNcLEeqXpuBdEolY7w#_OBCrWtcLEeqXpuBdEolY7w"/>
    <dcterms:contributor rdf:resource="https://jazz.ibm.com:9443/jts/users/ibm"/>
  </rdf:Description>
  <rdf:Description rdf:nodeID="A0">
    <dcterms:title>1378</dcterms:title>
  </rdf:Description>
</rdf:RDF>

Another approach using a public API which should give outgoing link information is the DN Reportable REST API see https://jazz.net/wiki/bin/view/Main/DNGReportableRestAPI - sorry don't have an example of this.

HTH
Ian


Comments
CLM _User commented Jul 06 '22, 12:49 p.m.

Thanks Ian for guidance and ways you suggested, I will try with public APIs and will come back with updates. 


permanent link
Ralph Schoon (63.1k33646) | answered Jul 06 '22, 4:57 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

 As I already mentioned in my comment the API you use is an internal API. Internal APIS must only be used by the tool itself. Just because it worked in 6.0.6, does not mean anything for newer versions. Since it is an internal API nothing is documented in a way that it is accessible to the users. So it might have worked in 6.x the way you use it and they added a requirement for a private header. 


See https://jazz.net/forum/questions/171394/get-all-rm-artifacts-that-have-links-of-any-type-specific-type which mentions that it is private. I do not know what private header is missing.

There are mentions of a private header in some forum questions here.

I do not have the time and liberty to debug internal APIs and can not help here.

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.