It's all about the answers!

Ask a question

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

Asha U S (11) | asked Aug 19, 2:35 a.m.

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.

Ian Barnard commented Aug 19, 9:36 a.m. | edited Aug 25, 1:07 p.m.

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
Asha U S (11) | answered Aug 25, 2:02 a.m.

 Hello , 

Thanks for the response.
DNG  version-, iFix018
Query- https://server:port/rm/publish/modules/*  

permanent link
Ian Barnard (780612) | answered Aug 25, 5:02 a.m.
edited Aug 25, 5:05 a.m.

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.


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 which is url encoded to
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"?>
    <ds:artifact attribute:itemId="_4II6kNcJEeqXpuBdEolY7w">
        <rrm:title attribute:itemId="_3tK10dcJEeqXpuBdEolY7w">AMR System Requirements Specification</rrm:title>

permanent link
Asha U S (11) | answered Aug 25, 12:48 p.m.

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.

Ian Barnard commented Aug 25, 1:06 p.m.
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?

Ian Barnard commented Aug 25, 1:06 p.m.

 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!

Asha U S commented Sep 09, 2:03 a.m.
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 to post your answer.