Cannot access artifacts in folders in DNG with ELM Python Client #44
-
Hi, Some time ago I asked in the Jazz forum about the use of APIs in DNG . They indicated me that the Reportable API and the OSLC API were the way to go, as the REST API is private and undocumented. Right now we are using the Reportable API and applying filtering in the JavaScript code. We are able to run the extensions in DNG via the XML gadget , still our problem is to retrieve the data, load the JavaScript extension and update the front custom metrics based in the filtered data. Our problem is that, whenever the extension loads, it needs to retrieve all the data of project, make the proper filtering, taking a frustrating amount of time to load. After a lot of research in the Jazz.net forum, I found a comment mentioning this GitHub Python application. We still do not know how we could implement it to the JavaScript project extensions we currently have, but it might be a better way to filter and retrieve the data. I have tried to use the "oslc_query" script, but I am unable to access the artifacts of a view (or inside a folder) of a specific project area. The log seems to indicate that the connection is effectively ocurring. oslcquery -J https://abc.clm.com -U -P -p "P0M10121" -F "P0M10121 - Initial Stream" -q "rm_nav:parent=$""01 System Breakdown Structure (SBS)""" -s dcterms:title -O test1.csv oslcquery -J https://abc.clm.com -U -P -p "P0M10121" -F "P0M10121 - Initial Stream" -r rm_view:"Prueba1" -s dcterms:title -O test2.csv What am I doing wrong? There seems to be some sort of error regarding the string and the spaces after the "-q" and "-r" commands (I see there was another thread on the same topic, but the provided solution is not clear to me). Thanks for the development of the application, and also for your answer in advance. Pablo |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 9 replies
-
Not sure which "REST API" you're referring to, so can't comment. For me, your command #1 works once adapted to my server's URL/user/password/project/configuration/foldername without modifying the -q value - but obviously the folder "01 System Breakdown Structure (SBS)" (case- and space-sensitive) must exist - if it doesn't you get a rather long/messy error message including text like:
then
Your command #2 will never work because the oslcquery -r option doesn't accept anything like a view name. The OSLC Query API doesn't know anything about views. Also "rm_view:"Prueba1"" isn't valid syntax for an OSLC Query oslc.where query. Add -h to the command to see all the options. Trying to decode what you say it sounds like you're trying to write a DNG Extension widget (you refer to Javascript) which you want to do some analysis of artifacts in a view and (I guess) present some information to the user. Doesn't the extensions API allow retrieving artifacts in the current view? https://jazz.net/wiki/bin/view/Main/RMExtensions702 I thought examples like the ASIL guidance widget process visible artifacts to update an ASIL attribute, see https://jazz.net/wiki/bin/view/Main/RMExtensionsExamples702 I'm no expert on DNG extensions. I doubt you're going to be able to invoke |
Beta Was this translation helpful? Give feedback.
-
If you want to use OSLC Query to get all artifacts in a module, use e.g. (on Windows)
This uses my enhanced query notation - you use ^ followed by the name of a module and will find its URI to put into the OSLC Query that's executed. There's a a similar notation $"01 Requirements" to get the URI of a folder, and also ~1234 will find the URI of an artifact with identifier 1234. Obviously you'll have to adapt to your server/project/stream/module name. Add -V if you want to see the query url that's generated, in this case:
Note the quoting - Windows needs the whole -q value surrounded by quotes because it contains a space, and inside the quotes existing quotes have to be doubled. |
Beta Was this translation helpful? Give feedback.
If you want to use OSLC Query to get all artifacts in a module, use e.g. (on Windows)
oslcquery -J https://jazz.ibm.com:9443 -U ibm -P ibm -p "rm_optin_p1" -F "rm_optin_p1 Initial Stream" -s * -q "rm:module=^""AMR Stakeholder Requirements Specification"""
This uses my enhanced query notation - you use ^ followed by the name of a module and will find its URI to put into the OSLC Query that's executed. There's a a similar notation $"01 Requirements" to get the URI of a folder, and also ~1234 will find the URI of an artifact with identifier 1234.
Obviously you'll have to adapt to your server/project/stream/module name.
Add -V if you want to see the query url that's generated, in this case:
h…