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

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

 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

0 votes

Comments

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

 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
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

1 vote

Comments

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


Permanent link

 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.

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
× 10,937

Question asked: Jul 06 '22, 4:24 a.m.

Question was seen: 1,281 times

Last updated: Jul 06 '22, 12:49 p.m.

Confirmation Cancel Confirm