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

DNG REST API to get list of components for a project?

What is the magic DNG REST API combination that gives the list of components for a DNG project?


Thanks!

0 votes

Comments

You can find the documented ELM APIs here: https://jazz.net/wiki/bin/view/Deployment/ELMProductAPILanding

i can find nothing in that mess of documentation that successfully gives me a list of components from a DNG project. please make sure the answer is in the docs before you post. thanks!



2 answers

Permanent link

The Request-Address for getting all components of a project for DNG is:


GET https://<example-server>/rm/cm/component/ldpc?project=<your project-uri e.g._5o9L0MacEeq6_fWT7NFgmw >
OSLC-Core-Version: 2.0

Could be send with Accept: application/json or application/rdf+xml

1 vote

Comments

have you actually used that successfully?


i get a 400 response when i adapt that to my server...

Thanks Antje. I think M K meant to also say "thank you for trying to help".

Works for me.

"i get a 400 response when i adapt that to my server..."

If you would at least provide minimal information about the call you did, maybe someone could have pointed out what you are doing wrong. 

Yes I am using this request in variable widgets for DNG which I have created and it works fine.


You have to adapt the GET-address to your server and your project-url: So you have to replace the text which is in the the tags <>

1 vote


Permanent link
Did you search the forum?

Here's an answer which shows the discovery sequence to find components https://jazz.net/forum/questions/266334/dng-oslcfetch-components-from-project-area

BTW You shouldn't use hardcoded URLs - use discovery as this is much more robust as DOORS Next and ELM are updated.


0 votes

Comments

your example gives the same type of URL as Antje and that URL doesn't work for me (Error 400: Bad Request / invalid UUID), which is why i ask if they actually used it. ppl love to quote docs here but i get the feeling no one actually tries it.


the example URLs in your previous post, if i click on them should they work or are they just toy examples?

Obviously, the example URL's are not accessible over the internet. ppl love to get a readily served example for exactly their question. Unfortunately it is not that simple. Just seeing a URL like GET https://<example-server>/ should be obvious.

touché, but the fact remains that thus far no one has been able to give me an example that i can adapt to my server that works.


what i mean to say, just to be clear, is that https://example.com/rm/cm/component/ldpc?project=_XXX does not work despite all the posts and docs you regurgitate.

Antjes solution works for me.

Headers:
OSLC-Core-Version: 2.0
Accept: application/rdf+xml

Replace the server fully qualified host name elm.example.com:9443 and the project area URI https://elm.example.com:9443/rm/cm/component/ldpc?project=https%3A%2F%2Felm.example.com%3A9443%2Frm%2Fprocess%2Fproject-areas%2F_cOrckM9TEe-lNcbLah5K4w with valid values 
If you use _XXX as project area ID or miss providing the correct headers, you call will fail.
Discovery:


What version of DOORS Next are you using?

Those URLs were real (for my private server jazz.ibm.com) when I captured that discovery sequence. Even if the details have changed as long as you follow the discovery sequence I linked to you will get possibly different URLs that are correct for that server.


Maybe the problem is you/your environment rather than the URLs?

If you want more help, and can restrain your tone so as to be polite, update your question with the full detail of trying to retrieve the components, including URL, headers, and the response.

I had to correct the selector for the project area.

showing 5 of 7 show 2 more comments

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

Question asked: Jan 10, 2:40 a.m.

Question was seen: 208 times

Last updated: Jan 13, 2:30 a.m.

Confirmation Cancel Confirm