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

Hello, I want to query the modules and artifacts in a RM Baseline/Stream irrespective of the folders they are present in.

I want to query the modules and artifacts in a RM Baseline/Stream irrespective of the folders they are present in. Though I was able to query for some of the baselines, some modules are missing in the result. Suppose if there are 3 modules when viewed from browser, only 2 are showing up in the query result(only in few cases). Not able to figure out the root cause for this inconsistency on why this is happening in some cases. Please help. Thanks in advance.

0 votes

Comments

What version+ifix are you using?

What method are you using to query - give details of the query you're making?



3 answers

Permanent link

 Hello , 

Thanks for the response.
DNG  version-6.0.6.1, iFix018
Query- https://server:port/rm/publish/modules/*  
with VVCCONFIGURATION and OSLCCONFIG headers.

0 votes


Permanent link

The reportable REST query you're using works irrespective of the folder the module is in. It's possible the server wants to return more than one page of results and the "missing" modules are in subsequent pages you're not retrieving.


with VVCCONFIGURATION and OSLCCONFIG headers.

Those aren't valid header names.

The correct way to specify the configuration is:

Either 1.. Using a parameter oslc_config.context=the config url

You must URL-encode the configuration URL as for any parameter specified in a url, i.e. this is a requirement of general http URLs not a DOORS Next or ELM requirement.

This method can be very convenient because you can put the url with the parameter into a browser tab and you will get the first page of the XML result - so it's a good way to check that you're building the URL correctly.

For example, for configuration https://jazz.ibm.com:9443/rm/cm/stream/_3TPS4NcJEeqXpuBdEolY7w which is url encoded to https%3A%2F%2Fjazz.ibm.com%3A9443%2Frm%2Fcm%2Fstream%2F_3TPS4NcJEeqXpuBdEolY7w%0D%0A
Or 2.. Using a header Configuration.Context=the config url

For example:
The returned XML is paged if there are many results (I've seen this when there are more than 100 results, but AFAIK the actual number at which paging is started is server-decided) - use the href attribute in the opening tag as the URL to retrieve the next page, until it isn't present or result from it is empty.
<?xml version="1.0" encoding="UTF-8"?>
                 xmlns:rrm="http://www.ibm.com/xmlns/rrm/1.0/"
                 xmlns:attribute="http://jazz.net/xmlns/alm/rm/attribute/v0.1"
                 xmlns:comments="http://jazz.net/xmlns/alm/rm/comments/v0.1"
                 xmlns:field="http://jazz.net/xmlns/alm/rm/field/v0.1"
                 xmlns:history="http://jazz.net/xmlns/alm/rm/history/v0.1"
                 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
                 xmlns:rm="http://www.ibm.com/xmlns/rdm/rdf/"
                 xmlns:term="http://jazz.net/xmlns/alm/rm/term/v0.1"
                 xmlns:text="http://jazz.net/xmlns/alm/rm/text/v0.1"
                 xmlns:view="http://jazz.net/xmlns/alm/rm/view/v0.1"
                 xmlns:xhtml="http://www.w3.org/1999/xhtml"
                 appId="RRC"
                 rel="next"
                 rrm:totalCount="11"
                 vMajor="60"
                 vMinor="06">
    <ds:artifact attribute:itemId="_4II6kNcJEeqXpuBdEolY7w">
        <rrm:title attribute:itemId="_3tK10dcJEeqXpuBdEolY7w">AMR System Requirements Specification</rrm:title>

0 votes


Permanent link

Headers are given the right way like you mentioned(Sorry I happened to mention in short form above). And in the result I see rrm:totalCount="1" with the details of that single module alone whereas I'm able to query all modules in some cases where all the modules are present at same level. So please suggest if there is any alternate way to do this.

0 votes

Comments
I don't understand how your query can return selectively modules from different folders because the reportable rest query like "https://server:port/rm/publish/modules/*" doesn't have any folder limitation or specification of the folder - it's got nothing to do with folders.

What are you varying in the query when you say you sometimes see one module and sometimes see other modules? If it's the configuration then presumably those configurations have different numbers of modules in different folders; that's perfectly valid. If you're somehow hoping the result should somehow return all modules in all configurations, well it won't.

The only way to get results with modules in different local configurations is when you use a global configuration and then you'll see results from all local contributions to that global configuration; is that what you're trying to do?


 Some tips for debugging:

1. Try moving to the style #1 where the configuration is a parameter in the URL and then you can get the result directly in your browser, save to a file and examine in an editor.
2. Also try tracing exactly what your code sends to the server using a man-in-the-middle proxy like Telerik Fiddler Classic.

Good luck!

I tried with both styles you have mentioned but did not work.
And yes, I'm changing local configurations with the same global configuration and expecting the modules from each local configuration associated to the GC(as shown in browser), that's the requirement.

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

Question asked: Aug 19 '21, 2:35 a.m.

Question was seen: 1,437 times

Last updated: Sep 11 '21, 6:26 a.m.

Related questions
Confirmation Cancel Confirm