It's all about the answers!

Ask a question

How to generate a report for getting all the configuration that contain a specific data?

Gayathri Vikraman (6611210) | asked Oct 09 '18, 7:49 a.m.
edited Oct 10 '18, 6:22 a.m. by Paul Slauenwhite (8.4k12)

 What user is looking for is a method by which configurations related to a specific data to be retrieved. Let’s say given an artifact id / artifact type, they want to know which all configurations (streams and baselines) of a specific project has that data within.

A report that will have the following details
  • Project area name / URL
  • Component name / URL
  • Configuration name / URL
  • Specified Data

I tried to use a SPARQL which was shared few years back by IBM to get the information of a specific artifact type, but not able to customise that to get the column for configuration details. Can some help in adding a column that will also give the configuration name / URL as well in addition to the project name and component name?

NOTE: I tried to submit a PMR with IBM to get help on this and they confirmed it is out of scope for support and suggested to submit a post in Forum.

SPARQL used: 
 PREFIX dcterms: <>
PREFIX merge: <>
PREFIX rdfs: <>
PREFIX rdf: <>
PREFIX oslc: <>
PREFIX oslc_config: <>
PREFIX process: <>
SELECT DISTINCT ?uri ?project ?component ?title
?uri rdf:type oslc:ResourceShape .
?uri merge:mergeShape ?mergedShapeUri.
FILTER(contains(str(?mergedShapeUri), "Requirement"))
?uri dcterms:title ?title.
?uri oslc_config:component ?component.
?uri oslc:serviceProvider ?provider.
?provider oslc:details ?projectUri .
?projectUri rdf:type process:ProjectArea.
?projectUri dcterms:title ?project.
ORDER BY ?project


Gayathri Vikraman commented Oct 11 '18, 10:36 a.m.

 Can someone help here please?

2 answers

permanent link
Nick Crossley (1463) | answered Oct 11 '18, 1:03 p.m.

 Look at the OSLC Configuration Management specification at for the RDF you need to write the query.

To find all uses of some version of one or more resources, you would need SPARQL similar to that below. Note that the values for ?v need to be version resource URIs, not concept resource URIs, and that you need to run this query against the all data endpoint, not in the scope of any configuration. Configurations themselves are not in the scope of a configuration.

PREFIX oslc_config: <>
PREFIX dcterms:     <>

SELECT DISTINCT ?artifactTitle ?componentTitle ?gstreamTitle
   # Include this part to get the component and title for the version resource
   ?v dcterms:isVersionOf ?concept .
   graph ?v
    ?concept oslc_config:component ?component ;
            dcterms:title ?artifactTitle .
   ?component dcterms:title ?componentTitle .

   # Find all local streams that select one of the given version resources
   ?lc oslc_config:selections/oslc_config:selects ?v ;
      a oslc_config:Stream .

   #  Find all global streams that have the above local streams as contributions (directly or indirectly)
   ?gc (oslc_config:contribution/oslc_config:configuration)* ?lc ;
      a oslc_config:Stream ;
      dcterms:title ?gstreamTitle .
    # Put the version resource URIs of the things you are looking for here, e.g.:


Gayathri Vikraman commented Oct 15 '18, 10:46 a.m.

 Thanks Nick for the response. I tried to get the versioned resource URI of a testcase in RQM using REST API but could not get it. As RQM web links for artifacts do not expose the configuration link, I tried REST API and could not get the info there either.

permanent link
Nick Crossley (1463) | answered Oct 15 '18, 5:19 p.m.

If you use the OSLC API to GET an RQM resource in the context of some configuration, you will see the version resource URI in the response. You can also use OSLC query.

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.