Get UUID of a Project Area with id or name - using OSLC and SCM Command Line
3 answers
There are two approach options that I see:
- The EWM Plain Java Client Libraries. A lot of the code you wound need is in WCL - Note the link. You could extend it for your purpose or you grab the code you like.
- You se OSLC and you read up on it. If you want to start understanding how OSLC works, this might be an interesting source: https://rsjazz.wordpress.com/2021/09/29/using-the-ewm-rest-and-oslc-apis/
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
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 ?
I was secretly hoping for an easy solution that I might have missed, but since it doesn't exist I'll go deeper into oslc.
Also, with SCM you can create a link between the change set and the Workitem if you specified the WI during the check-in command.
edit: You have in a better way also the command "add workitem" that associates a change set with a work item.
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 think it's not a really clean solution since the complexity is proportional with the number of PA but I didn't find another way to reach this goal.
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.
Comments
Ralph Schoon
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Mar 27, 7:05 a.m.Quentin,
Quentin Guyot
Mar 27, 8:23 a.m.I am also currently testing the rtcclient library
thanks