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

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

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.

1 vote

Comments

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)

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

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.  :(

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

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

1 vote

Comments

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


this helps a lot! Thank you!


Permanent link
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']

0 votes

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,926
× 515
× 46
× 18
× 3

Question asked: Oct 08, 5:29 a.m.

Question was seen: 305 times

Last updated: Oct 22, 5:19 a.m.

Confirmation Cancel Confirm