How to get the list of module using an artifact (REST API)?
![]()
Hi
I want to get the list of all the module that make use a specific artifact. I have access via the REST API to the artifact information in the context of the module and the core. https://<server>:<port>/rm/publish/resources?resourceURI=<GUID> When looking at the results for the artifact in the context of a module, I can get the information about the current module (moduleContext), but not the other modules (was expected) . When looking at the core artifact I don't see any information relative to modules. I do not want to query every module in the database to find the specified artifact. Is there a flag to add in the query to get the information? Regards |
One answer
![]()
Sadly, if you use reportable REST API, you have to query every single module in order to find all the modules in which a particular artifact is used. Reportable REST API provides filtering capability, which is not the same as search/query capability. When using the filtering capability, you will potentially put a heavy load on the server.
You can use the OSLC query capability to do the following search. 1. Search by Id, and the result should contain one base/core artifact and zero to many module artifacts. 2. Use the oslc_rm:uses condition to search for modules based on the result returned at the previous step. References: https://jazz.net/library/article/1197 https://jazz.net/forum/questions/206109/rdng-601m1-returns-2-requirement-when-search-by-id-why |
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.