How to fetch all project area, components in ETM using OSLC API?
Is there a way in ETM to fetch all the projects and components using OSLC API? |
One answer
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"/>
<oslc:queryBase rdf:resource="https://hostname/qm/oslc_config/resources/com.ibm.team.vvc.Component"/>
<oslc:resourceShape rdf:resource="https://hostname/qm/oslc_config/resourceShapes/com.ibm.team.vvc.Component"/>
<dcterms:title rdf:parseType="Literal">Default query capability for Component</dcterms:title>
<rdf:type rdf:resource="http://open-services.net/ns/core#QueryCapability"/>
</rdf:Description>
<rdf:Description rdf:nodeID="A20">
<oslc:resourceType rdf:resource="http://open-services.net/ns/config#Configuration"/>
<oslc:queryBase rdf:resource="https://hostname/qm/oslc_config/resources/com.ibm.team.vvc.Configuration"/>
<oslc:resourceShape rdf:resource="https://hostname/qm/oslc_config/resourceShapes/com.ibm.team.vvc.Configuration"/>
<dcterms:title rdf:parseType="Literal">Default query capability for Configuration</dcterms:title>
<rdf:type rdf:resource="http://open-services.net/ns/core#QueryCapability"/>
</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
How would one use this query base
to query for only those components/configurations in a specific project?
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
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.