It's all about the answers!

Ask a question

How to copy artifacts (i.e., with same identifier) from one module to another through RM API


Sowndhar S (152) | asked May 02, 6:10 a.m.
edited May 02, 7:11 a.m.

I want to add the artifacts which are in one module to another module using RM API. The artifact's identifier should be same in both module. How can I achieve it through API ?

Thanks in advance.

One answer



permanent link
Ian Barnard (2.3k714) | answered May 02, 7:46 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited May 02, 7:48 a.m.

I think what you want to do is reuse existing artifacts in another module - it's the same base artifact bound into the module structure - a binding has the attribute values of the base artifact, so has the same ID, but can have module-specific links to/from the binding.


You can get and modify module structure using the DN Module API https://jazz.net/wiki/bin/view/Main/DNGModuleAPI

Be careful about headers - you'll need OSLC-Core-Version: 2.0 for the OSLC APIs, but don't provide this header wen accessing the module API. Do provide DoorsRP-Request-Type: public 2.0 (capitalised exactly like that) when accessing the Module API.

See here for the entry point of all ELM APIs https://jazz.net/wiki/bin/view/Deployment/ELMProductAPILanding


Comments
Sowndhar S commented May 06, 2:33 a.m.

Thank you for your response.

Could you please elaborate on your answer by providing some examples of how to form the URL? I have prior experience working with RM APIs only, so examples would be greatly appreciated and helpful for me.


Ian Barnard commented May 07, 8:23 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
In general you won't 'form' the URL, you'll use e.g. OSLC Query to find the module URL, do a GET (using the Module API) to retrieve the structure URL, do a GET (using the Module API) on that to retrieve the module structure. You'll use discovery to find configuration URLs, etc. If you find yourself adding a string to a URL you're probably doing something wrong and your code will be fragile as versions of ELM evolve perhaps changing how URLs are structured.

Your answer


Register or 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.