Get UUID of a Project Area with id or name - using OSLC and SCM Command Line
Hi,
I am currently developping a tool that communicate with RTC using mainly SCM CL but since Workitems aren't supported by it, i am also looking into OSLC.
So, I need to find the UUID of a Project Area in order to make OSCL resquest on it, to find attached Work item.
|
3 answers
Ralph Schoon (63.5k●3●36●46)
| answered Mar 27, 8:51 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER There are two approach options that I see:
Just because you have that one URI does not mean that this URI would work in your case. You are not necessarily asked to compose such an URI based on an UUID and guessing the rest. OSLC in EWM has a discovery mechanism you are supposed to use. You need to be authenticated as well and that is not necessarily trivial, so if you want to go OSLC read up on how that works in https://rsjazz.wordpress.com/2021/09/29/using-the-ewm-rest-and-oslc-apis/ . The information is really useful. I wish I had it back then. I had to write it. The EWM Plain Java Client Libraries are also explained in several posts on https://rsjazz.wordpress.com. Comments In addition: here the APIS that are available: https://jazz.net/wiki/bin/view/Deployment/ELMProductAPILanding
The Reportable REST API is read only, so if you need to create a link to a change set, it is useless: https://jazz.net/wiki/bin/view/Main/ReportsRESTAPI#Reportable_REST_API
A last thought, make sure you can create the change set link. As far as I am aware, at least with the Plain Java Client Libraries, I was unable to create a change set link to a work item, because the Java API complained that this link could only be created by the SCM component.
There might be some special save parameter or something that needs to be added for this to work. I forgot the point that I am not able to download Java on this pc, that's why I use only python for this project, and why OSLC might be the only solution to my problem here... I already read a big part of your post in wordpress about OSLC, but I have to admit that it's not trivial, It is still not that clear in my mind. But when you say "discovery" your talking about rootservices and services files, right ?
|
For the moment I am quering the project area list, after that I browse into it (with a basic for loop) quering for project areas details and if the name of the Project Area is corresponding to the name of the one I am searching for, I extract the UUID of this one.
|
I juste found that you can add to your SCM request "--show-uuid y" in the context of a "list [something]" in order to obtain the UUID of artefacts.
Something like "scm --show-uuid y list projectareas -r [url]" do the job.
After that, you just have to search into the resulting list to find by name the correct UUID.
|
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.
Comments
Quentin,
I am also currently testing the rtcclient library
thanks