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.
|
3 answers
![]() Hello ,
Thanks for the response.
DNG version-6.0.6.1, iFix018
Query- https://server:port/rm/publish/modules/*
with VVCCONFIGURATION and OSLCCONFIG headers.
|
![]()
Ian Barnard (2.0k●6●13)
| answered Aug 25 '21, 5:02 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited Aug 25 '21, 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.
> 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.
|
![]() 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.
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
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.
Comments
What version+ifix are you using?