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

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


0 votes



One answer

Permanent link
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

0 votes

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,952
× 481
× 332

Question asked: Sep 17 '15, 1:02 p.m.

Question was seen: 4,784 times

Last updated: Sep 29 '15, 1:45 a.m.

Confirmation Cancel Confirm