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

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

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.

0 votes



One answer

Permanent link

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

0 votes

Comments

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.

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 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,948

Question asked: May 02 '24, 6:10 a.m.

Question was seen: 620 times

Last updated: May 07 '24, 8:23 a.m.

Confirmation Cancel Confirm