It's all about the answers!

Ask a question

How to fetch all project area, components in ETM using OSLC API?


Bharath Rao (915241) | asked Jun 20 '23, 2:00 a.m.

 Is there a way in ETM to fetch all the projects and components using OSLC API?

One answer



permanent link
Bharath Rao (915241) | answered Jun 20 '23, 2:10 a.m.

This question has been answered as part of https://jazz.net/forum/questions/272350.


Here are the specific OSLC APIs to fetch the details:

ProjectAreas:
OSLC Catalog contains details of the project areas in ETM.

Components and Configurations:
Use the OSLC Configuration catalog to review the query capabilities.

Fetching the OSLC Configuration catalog, we have the following query capabilities for Components and Configurations:

<rdf:Description rdf:nodeID="A19">
    <oslc:resourceType rdf:resource="http://open-services.net/ns/config#Component"/>
    <dcterms:title rdf:parseType="Literal">Default query capability for Component</dcterms:title>
  </rdf:Description>

<rdf:Description rdf:nodeID="A20">
    <oslc:resourceType rdf:resource="http://open-services.net/ns/config#Configuration"/>
    <dcterms:title rdf:parseType="Literal">Default query capability for Configuration</dcterms:title>
  </rdf:Description>

A GET on the querybase URL will provide the components / configurations available in ETM.

Note:
For any OSLC GET requests the following headers should be used
Accept: application/rdf+xml
OSLC-Core-Version: 2.0


Comments
David Akehurst commented Aug 21, 9:13 a.m. | edited Aug 21, 9:15 a.m.
How would one use this query base

to query for only those components/configurations in a specific project?

I tried to create an oslc query along the lines of

oslc.where=process:projectArea{dcterms:title="My Project"}

but that does not work!!


Ian Barnard commented Aug 21, 12:18 p.m. | edited Aug 22, 3:42 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Each querybase allows querying specific resourceType - for Bharath's example there are two - one query capability for components and a different query capability for configuraitons.


There are very many ways to make an OSLC Query that doesn't work (in the sense of not getting any results, and also in the sense of getting an error response). Suggest you start by not providing an oslc.where but include oslc.select=* and see what resources you get and what properties they have because these are the properties you can use in an oslc.where to filter/see only what you're interested in. NOTE that ETM/DN OSLC Query may not support everything you'd like to do. For example there's no OR between the oslc.where terms, only AND. Also there's no way to find only resources without a value for a particular property.

Also it's not really possible to help if the only problem description is "does not work": be specific:
* Which querybase did you use?
* What was the result?
* What was the ful actual URL you used?
* What headers did you provide?

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.