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

Is there any way to suppress moduleContext information in the DNG REST API?

 I would expect a "resources" REST call to only return base artifact information, but it turns out to be extremely heavy weight on large modules.  Is there any way to suppress moduleContext information from being returned?

0 votes


Accepted answer

Permanent link

Not sure why you think a module should return resources for base artifacts only. A module always refers to module artifacts, while the module artifacts recognize their corresponding base artifact.

If you just want to find out the resource URIs for all the base artifacts in a module, here is what I have found out. When using REST API only, it appears no effective field selection is available for a module. XPath doesn't work (not implemented), and attribute filtering does not work (not available for hierarchical data) either. If you are building an application to process this, the below method should reduce the memory requirement significantly.
1. Use OSLC API (not REST API) to get the module information first. The returned XML should be quite simple and should be easy to process.
2. For each module artifact returned within the module, use the "resources" REST API to find out the corresponding base artifact - its UUID appears in the <rrm:core> attribute.

It can be slow if there are lots of artifacts in the module though.

Robert Huet selected this answer as the correct answer

0 votes

Comments

Sorry, my initial question was not stated very clearly.  I would expect a "resources" query that includes a set of module artifacts to provide a lightweight response with only module-level information for these modules (not the artifacts they contain).  The "modules" query is the one that could be more heavyweight and return the moduleContext for all the artifacts it contains.  I believe that is how "resources" and "collections" queries worked in the early RRC versions.


So I take it from your response that the answer is "No".  There are no REST API that can return just the module level information without all the added moduleContext for all the contained elements.  Also, there is no undocumented flag that would suppress that level of detail.  Is that right?
Thanks,
Robert 

I'm with you on this one. The "resources" format returns that exact same information as the "modules" format, which does not make sense to me. But that's the current implementation anyway.

The OSLC API returns a lighter version of the content (which I suspect is what you want), but it seems that you're doing something in RPE, so I'm not sure how practical it can be.

As for the flags, "fields" and "attributeURI" are the only ones that I can find in the document, for this particular purpose. Other than those, I am not aware any other flags/parameters.

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

Question asked: Feb 07 '17, 11:16 a.m.

Question was seen: 2,122 times

Last updated: Feb 08 '17, 8:40 p.m.

Related questions
Confirmation Cancel Confirm