It's all about the answers!

Ask a question

Fetch List of Views Programmatically from Configuration Context


jyoti mishra (45138) | asked Nov 15 '21, 6:25 a.m.

 Hello Everyone,


Is there OSLC API or Reportable REST API , to get all views from specific stream or baseline. The response should contain view UUID.

Thanks and Regards,
Jyoti

One answer



permanent link
Ian Barnard (1.9k613) | answered Nov 16 '21, 3:28 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Nov 16 '21, 3:37 a.m.

Hi Jyotl


1. One of the DOORS Next QueryCapability sections in services.xml is to OSLC query for views. AFAICT it doesn't use oslc.where so you have to filter the query results for the view you want. Also oslc.select isn't used.

Work from rootservices to find the services.xml for a project/component in the configuration you're interested in - for an example of this see my answer here https://jazz.net/forum/questions/266334/dng-oslcfetch-components-from-project-area/266667

Once you get to services.xml the query capability for views is identified by <oslc:resourceType rdf:resource="http://jazz.net/ns/rm/dng/view#View"/>, for example:
        <oslc:queryCapability>
          <oslc:QueryCapability>
            <oslc_config:component rdf:resource="https://jazz.ibm.com:9443/rm/cm/component/J_JEEB6Eeuh3Iiax2L3Ow"/>
            <oslc:resourceType rdf:resource="http://jazz.net/ns/rm/dng/view#View"/>
            <oslc:queryBase rdf:resource="https://jazz.ibm.com:9443/rm/views_oslc/query?componentURI=https%3A%2F%2Fjazz.ibm.com%3A9443%2Frm%2Fcm%2Fcomponent%2F
J_JEEB6Eeuh3Iiax2L3Ow"/>
            <dcterms:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string">View Definition Query Capability</dcterms:title>
          </oslc:QueryCapability>
        </oslc:queryCapability>
This is configuration-specific, so keep applying the oslc_config.context parameter or Configuration-Context header, and always use OSLC-Core-Version: 2.0.

2. The DOORS Next Reportable REST API returns content (e.g. resources) from views when using the viewName or viewURI filter. If using viewName then you don't need the view UUID. See https://jazz.net/wiki/bin/view/Main/DNGReportableRestAPI

HTH
Ian

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.