It's all about the answers!

Ask a question

Get all folders/modules in a component of a project area using REST/OSLC for analytics


Geethika Tiramdas (26114) | asked Oct 08, 5:29 a.m.
edited Oct 08, 5:31 a.m.

I use the following hierarchy:

Project Areas [i got them: https://server:port/rm/process/project-areas or https://server:port/rm/oslc_rm/catalog]
      Components [i also got these https://server:port/rm/rm-projects/{Project ID}/components]
            Folders / Modules [still did not get them]
                  Views
                        Artifacts [need this data]
I use python to query and get data, to store them. I just want to GET, don't want to post/put as i need the data for analytics.
I am on ELM v7.

Please help. Thank you.


Comments
M K commented Oct 22, 4:56 a.m.

can you confirm your components link? i'm trying it and versions of it, but can't seem to make it work... :(

For example: https://example.com/rm/process/rm-projects/_xxx/components

where _xxx is a project id, returns 404

(i'm on 7.0.3)


Geethika Tiramdas commented Oct 22, 5:08 a.m.

it is https://example.com/rm/rm-projects/_XXX/components 
there is no 'process' here. can you try this?


M K commented Oct 22, 5:17 a.m. | edited Oct 22, 5:17 a.m.
if i put "/rm/rm-projects/_XXX/components" into chrome, after i hit enter the URL is changed to "/rm/process/project-areas/_xxx/components" for which i get a 404.  :(

Geethika Tiramdas commented Oct 22, 5:19 a.m.

I think it maybe because I use a custom version of IBM tool (as a serviced product), not the open source one. :(

2 answers



permanent link
Ian Barnard (2.3k714) | answered Oct 09, 7:13 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Hi


In each project/configuration there's an OSLC Query Capability which allows you to discover the hierarchy of folders.

You can use OSLC Query or Reportable REST APIs to discover modules and artifacts.


HTH
Ian


Comments
Geethika Tiramdas commented Oct 22, 5:08 a.m.

I found your GitHub repository for API: https://github.com/IBM/ELM-Python-Client.git 


this helps a lot! Thank you!


permanent link
M K (30348) | answered Oct 22, 5:10 a.m.
i use a 2 stage approach to getting artifacts from modules. i define a component view that lists the modules to be processed and use REST API to get this view. then i have the module ids (e.g. MD_xxx) and i construct URLs to get a view from each of those modules and process those results.

this code creates the first url to get a component view ('prj_view'), which is a list of modules:
        url = dng_publish(entry['server'], 'modules')
        url += '?' + entry['prj_view']
        url += '&' + entry['project']
        url += '&' + entry['config']

then i construct urls per module like this:
        url = dng_publish(module['server'], 'views')
        url += '?' + module['mod_view']
        url += '&' + 'moduleUri=' + mod_itemid
        url += '&' + 'projectURI=' + module['proj']
        url += '&' + module['config']

Your answer


Register or 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.