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

[closed] How to get all modules in a project in DNG

 Currently I am using the below query to fetch all the modules in a project.


But this returns both modules and core artifacts.

How to get only the modules list?

0 votes

Comments

You should also specify a configuration context using an oslc_config.context parameter. If you omit it, the query will run against a default configuration and this may not be what you want,


You might want to have a look at the RDF for a module and see if there is a specific rdf:type that applies to modules and not core artifacts.


The question has been closed for the following reason: "The question is answered, right answer was accepted" by ianbarnard Apr 20 '23, 10:05 a.m.

Accepted answer

Permanent link
Module artifacts are core artifacts really, so not sure what's wrong with your overall OSLC Query but something is. Perhaps it's related to the configuration that David mentioned. I've seen badly-written queries return everything, i.e. don't always give an explicit error.

Also the query you show doesn't have URL encoding for the query parameter values - it needs this, example below.

Also you don't specify version+ifix - below works with 7.0.2SR1 and I would expect to work with 7.x.

For modules the query (before url encoding of the parameter value) should be:

  • oslc.where=rdf:type=jazz_rm:Module
or the exact equivalent without using a prefix:
A fully url-encoded query using this is:
In addition the following headers:
  • OSLC-Core-Version: 2.0
  • Accept: application/rdf+xml
  • Configuration-Context: config url

HTH
Ian

G C selected this answer as the correct answer

0 votes

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
× 7,501
× 1,331

Question asked: Apr 19 '23, 4:59 a.m.

Question was seen: 699 times

Last updated: Apr 20 '23, 10:05 a.m.

Confirmation Cancel Confirm