DNG : OSLC query to get views in a module
![]()
Jean-François CHAPELLE (64●14)
| asked Jan 19 '22, 1:16 a.m.
retagged Jan 19 '22, 8:14 a.m. by Ian Barnard (2.0k●6●13) Where can I find a sample OSLC query to get the views (shared and/or personnal) existing in a DNG module ?
My goal is :
Thank you for your help.
Regards.
|
Accepted answer
![]()
Ian Barnard (2.0k●6●13)
| answered Jan 19 '22, 5:31 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited Jan 20 '22, 8:48 a.m. Hi
If you follow the discovery sequence for your project/component/configuration you'll get a configuration-specific services.xml which includes query capabilities, and one of these is for views http://jazz.net/ns/rm/dng/view#View. NOTE this query capability doesn't pay attention to oslc.where or oslc.select - you get the detail for all views - for 7.0.2 this includes the scope and if module-scope the module ID, and whether it is shared. I assume it won't show you other user's private views..
There's an example of discovery in my answer here: https://jazz.net/forum/questions/266334/dng-oslcfetch-components-from-project-area
I think that was for 6.0.6.1 but whichever version it was for didn't then include the query capability for views.
This example below is from a component in 7.0.2 does include it, marked by <oslc:resourceType rdf:resource="http://jazz.net/ns/rm/dng/view#View"/>
:
NOTE 1. of course you must include the configuration when you make the query.
NOTE 2: the View query doesn't appear to use the oslc.select and oslc.where query parameters.
So in this instance the view query url is https://jazz.ibm.com:9443/rm/views_oslc/query?componentURI=https%3A%2F%2Fjazz.ibm.com%3A9443%2Frm%2Fcm%2Fcomponent%2FJ_JEEB6Eeuh3Iiax2L3Ow
Do a GET on this with headers:
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:oslc="http://open-services.net/ns/core#"
xmlns:oslc_config="http://open-services.net/ns/config#"
xmlns:jazzDisc="http://jazz.net/ns/discovery#"
xmlns:calm="http://jazz.net/xmlns/prod/jazz/calm/1.0/"
xmlns:rm="http://www.ibm.com/xmlns/rdm/rdf/"
xmlns:jp10="http://jazz.net/xmlns/prod/jazz/process/1.0/">
<oslc:ServiceProvider rdf:about="https://jazz.ibm.com:9443/rm/oslc_rm/-_28tkB6Eeuh3Iiax2L3Ow/services.xml">
<jazzDisc:messageReceiver rdf:resource="https://jazz.ibm.com:9443/rm/web/com/ibm/rdm/web/copyReceiver/CopyHandler.html"/>
<jp10:supportLinkDiscoveryViaLinkIndexProvider rdf:datatype=
<dcterms:publisher rdf:resource="https://jazz.ibm.com:9443/rm/application-about"/>
<jp10:globalConfigurationAware rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>no</jp10:globalConfigurationAware>
<oslc:service>
<oslc:Service>
<oslc:creationDialog>
<oslc:Dialog>
<oslc:usage rdf:resource="http://open-services.net/ns/core#default"/>
<oslc:resourceType rdf:resource="http://open-services.net/ns/rm#RequirementCollection"/>
<oslc:hintHeight>530px</oslc:hintHeight>
<oslc:hintWidth>600px</oslc:hintWidth>
<oslc:dialog rdf:resource="https://jazz.ibm.com:9443/rm/pickers/com.ibm.rdm.web.CreateCollectionPicker?projectURL=https%3A%2F%2Fjazz.ibm.com%3A9443%2Frm%2Frm-projects%2F-28tkB6Eeuh3Iiax2L3Ow"/>
<oslc:label>Collection</oslc:label>
<dcterms:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>Collection Creation</dcterms:title>
</oslc:Dialog>
</oslc:creationDialog>
<oslc:selectionDialog>
<oslc:Dialog>
<oslc:resourceType rdf:resource="http://open-services.net/ns/rm#RequirementCollection"/>
<oslc:resourceType rdf:resource="http://open-services.net/ns/rm#Requirement"/>
<oslc:hintHeight>550px</oslc:hintHeight>
<oslc:hintWidth>800px</oslc:hintWidth>
<oslc:dialog rdf:resource="https://jazz.ibm.com:9443/rm/pickers/com.ibm.rdm.web.GenericPicker?projectURL=https%3A%2F%2Fjazz.ibm.com%3A9443%2Frm%2Frm-projects%2F-28tkB6Eeuh3Iiax2L3Ow"/>
<oslc:label>Requirement</oslc:label>
<dcterms:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>Generic Requirement Selection</dcterms:title>
</oslc:Dialog>
</oslc:selectionDialog>
<oslc:creationFactory>
<oslc:CreationFactory>
<oslc:resourceShape rdf:resource="https://jazz.ibm.com:9443/rm/types/OTx7TGkB6Eeuh3Iiax2L3Ow"/>
<oslc:resourceShape rdf:resource="https://jazz.ibm.com:9443/rm/types/OTx7TKUB6Eeuh3Iiax2L3Ow"/>
<oslc:resourceShape rdf:resource="https://jazz.ibm.com:9443/rm/types/OTx7THkB6Eeuh3Iiax2L3Ow"/>
<oslc:resourceShape rdf:resource="https://jazz.ibm.com:9443/rm/types/OTx7TIUB6Eeuh3Iiax2L3Ow"/>
<oslc:resourceType rdf:resource="http://open-services.net/ns/rm#RequirementCollection"/>
<oslc:creation rdf:resource="https://jazz.ibm.com:9443/rm/requirementFactory?projectURL=https%3A%2F%2Fjazz.ibm.com%3A9443%2Frm%2Fprocess%2Fproject-areas%2F-_28tkB6Eeuh3Iiax2L3Ow"/>
<oslc:resourceShape rdf:resource="https://jazz.ibm.com:9443/rm/types/OTx7TJUB6Eeuh3Iiax2L3Ow"/>
<oslc:resourceShape rdf:resource="https://jazz.ibm.com:9443/rm/types/OTx7TJ0B6Eeuh3Iiax2L3Ow"/>
<oslc:resourceShape rdf:resource="https://jazz.ibm.com:9443/rm/types/OTx7TF0B6Eeuh3Iiax2L3Ow"/>
<oslc:resourceShape rdf:resource="https://jazz.ibm.com:9443/rm/types/OTx7TKkB6Eeuh3Iiax2L3Ow"/>
<oslc:resourceShape rdf:resource="https://jazz.ibm.com:9443/rm/types/OTx7TIEB6Eeuh3Iiax2L3Ow"/>
<oslc:usage rdf:resource="http://open-services.net/ns/core#default"/>
<oslc:resourceShape rdf:resource="https://jazz.ibm.com:9443/rm/types/OTx7TGUB6Eeuh3Iiax2L3Ow"/>
<oslc_config:component rdf:resource="https://jazz.ibm.com:9443/rm/cm/component/J_JEEB6Eeuh3Iiax2L3Ow"/>
<dcterms:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>Collection Creation Factory</dcterms:title>
</oslc:CreationFactory>
</oslc:creationFactory>
<calm:filter>
<calm:Filter>
<calm:filterBase rdf:resource="https://jazz.ibm.com:9443/rm/calmFilter/-_28tkB6Eeuh3Iiax2L3Ow/requirementsChangedSince"/>
<oslc:resourceType rdf:resource="http://open-services.net/ns/rm#Requirement"/>
<oslc:usage rdf:resource="http://jazz.net/xmlns/prod/jazz/calm/1.0/requirementsChangedSince"/>
<dcterms:title>Requirements Changed Since Filter</dcterms:title>
</calm:Filter>
</calm:filter>
<oslc:queryCapability>
<oslc:QueryCapability>
<oslc:resourceType rdf:resource="http://open-services.net/ns/rm#RequirementCollection"/>
<oslc:resourceType rdf:resource="http://open-services.net/ns/rm#Requirement"/>
<oslc:queryBase rdf:resource="https://jazz.ibm.com:9443/rm/views?oslc.query=true&projectURL=https%3A%2F%2Fjazz.ibm.com%3A9443%2Frm%2Fprocess%2Fproject-areas%2F-_28tkB6Eeuh3Iiax2L3Ow"/>
<dcterms:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>Query Capability</dcterms:title>
</oslc:QueryCapability>
</oslc:queryCapability>
<oslc:creationFactory>
<oslc:CreationFactory>
<dcterms:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>Requirement Creation Factory</dcterms:title>
<oslc_config:component rdf:resource="https://jazz.ibm.com:9443/rm/cm/component/J_JEEB6Eeuh3Iiax2L3Ow"/>
<oslc:resourceShape rdf:resource="https://jazz.ibm.com:9443/rm/types/OT_v7FZkHOiEeytoJ46yP5LHA"/>
<oslc:resourceShape rdf:resource="https://jazz.ibm.com:9443/rm/types/OTx7TH0B6Eeuh3Iiax2L3Ow"/>
<oslc:resourceShape rdf:resource="https://jazz.ibm.com:9443/rm/types/OTx7TGEB6Eeuh3Iiax2L3Ow"/>
<oslc:resourceShape rdf:resource="https://jazz.ibm.com:9443/rm/types/OTx7TIkB6Eeuh3Iiax2L3Ow"/>
<oslc:creation rdf:resource="https://jazz.ibm.com:9443/rm/requirementFactory?projectURL=https%3A%2F%2Fjazz.ibm.com%3A9443%2Frm%2Fprocess%2Fproject-areas%2F_-_28tkB6Eeuh3Iiax2L3Ow"/>
<oslc:resourceShape rdf:resource="https://jazz.ibm.com:9443/rm/types/OTx7TKEB6Eeuh3Iiax2L3Ow"/>
<oslc:resourceShape rdf:resource="https://jazz.ibm.com:9443/rm/types/OTx7THEB6Eeuh3Iiax2L3Ow"/>
<oslc:resourceShape rdf:resource="https://jazz.ibm.com:9443/rm/types/OTx7TK0B6Eeuh3Iiax2L3Ow"/>
<oslc:resourceShape rdf:resource="https://jazz.ibm.com:9443/rm/types/OTx7TJkB6Eeuh3Iiax2L3Ow"/>
<oslc:resourceShape rdf:resource="https://jazz.ibm.com:9443/rm/types/OTx7TJEB6Eeuh3Iiax2L3Ow"/>
<oslc:resourceShape rdf:resource="https://jazz.ibm.com:9443/rm/types/OTx7THUB6Eeuh3Iiax2L3Ow"/>
<oslc:resourceShape rdf:resource="https://jazz.ibm.com:9443/rm/types/OTx7TG0B6Eeuh3Iiax2L3Ow"/>
<oslc:resourceType rdf:resource="http://open-services.net/ns/rm#Requirement"/>
<oslc:usage rdf:resource="http://open-services.net/ns/core#default"/>
<oslc:resourceShape rdf:resource="https://jazz.ibm.com:9443/rm/types/OTx7TI0B6Eeuh3Iiax2L3Ow"/>
</oslc:CreationFactory>
</oslc:creationFactory>
<oslc:creationDialog>
<oslc:Dialog>
<oslc:resourceType rdf:resource="http://open-services.net/ns/rm#RequirementCollection"/>
<oslc:resourceType rdf:resource="http://open-services.net/ns/rm#Requirement"/>
<oslc:hintHeight>530px</oslc:hintHeight>
<oslc:hintWidth>600px</oslc:hintWidth>
<oslc:dialog rdf:resource="https://jazz.ibm.com:9443/rm/pickers/com.ibm.rdm.web.CreateGenericPicker?projectURL=https%3A%2F%2Fjazz.ibm.com%3A9443%2Frm%2Frm-projects%2F_-28tkB6Eeuh3Iiax2L3Ow"/>
<oslc:label>Requirement</oslc:label>
<dcterms:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>Generic Requirement Creation</dcterms:title>
</oslc:Dialog>
</oslc:creationDialog>
<oslc:queryCapability>
<oslc:QueryCapability>
<oslc:resourceType rdf:resource="http://jazz.net/ns/rm/navigation#folder"/>
<oslc:queryBase rdf:resource="https://jazz.ibm.com:9443/rm/folders?oslc.where=public_rm:parent=https%3A%2F%2Fjazz.ibm.com%3A9443%2Frm%2Fprocess%2Fproject-areas%2F-28tkB6Eeuh3Iiax2L3Ow"/>
<dcterms:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>Folder Query Capability</dcterms:title>
</oslc:QueryCapability>
</oslc:queryCapability>
<oslc:creationFactory>
<oslc:CreationFactory>
<oslc:usage rdf:resource="http://open-services.net/ns/core#default"/>
<oslc:resourceType rdf:resource="http://www.ibm.com/xmlns/rdm/types/TypeImportSession"/>
<oslc:creation rdf:resource="https://jazz.ibm.com:9443/rm/type-import-sessions"/>
<dcterms:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>Type System Copy Session Factory</dcterms:title>
</oslc:CreationFactory>
</oslc:creationFactory>
<oslc:selectionDialog>
<oslc:Dialog>
<oslc:usage rdf:resource="http://open-services.net/ns/core#default"/>
<oslc:resourceType rdf:resource="http://open-services.net/ns/rm#Requirement"/>
<oslc:hintHeight>550px</oslc:hintHeight>
<oslc:hintWidth>800px</oslc:hintWidth>
<oslc:dialog rdf:resource="https://jazz.ibm.com:9443/rm/pickers/com.ibm.rdm.web.RRCPicker?projectURL=https%3A%2F%2Fjazz.ibm.com%3A9443%2Frm%2Frm-projects%2F-28tkB6Eeuh3Iiax2L3Ow"/>
<oslc:label>Requirement</oslc:label>
<dcterms:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>Requirement Selection</dcterms:title>
</oslc:Dialog>
</oslc:selectionDialog>
<oslc:creationFactory>
<oslc:CreationFactory>
<oslc:usage rdf:resource="http://open-services.net/ns/core#default"/>
<oslc:resourceType rdf:resource="http://jazz.net/ns/rm/dng/config#DeliverySession"/>
<oslc:creation rdf:resource="https://jazz.ibm.com:9443/rm/delivery-sessions"/>
<dcterms:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>Delivery Session Factory</dcterms:title>
</oslc:CreationFactory>
</oslc:creationFactory>
<oslc:selectionDialog>
<oslc:Dialog>
<oslc:usage rdf:resource="http://open-services.net/ns/core#default"/>
<oslc:resourceType rdf:resource="http://open-services.net/ns/rm#RequirementCollection"/>
<oslc:hintHeight>550px</oslc:hintHeight>
<oslc:hintWidth>800px</oslc:hintWidth>
<oslc:dialog rdf:resource="https://jazz.ibm.com:9443/rm/pickers/com.ibm.rdm.web.CollectionPicker?projectURL=https%3A%2F%2Fjazz.ibm.com%3A9443%2Frm%2Frm-projects%2F-28tkB6Eeuh3Iiax2L3Ow"/>
<oslc:label>Collection</oslc:label>
<dcterms:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>Collection Selection</dcterms:title>
</oslc:Dialog>
</oslc:selectionDialog>
<oslc:domain rdf:resource="http://open-services.net/ns/rm#"/>
<oslc:creationDialog>
<oslc:Dialog>
<oslc:usage rdf:resource="http://open-services.net/ns/core#default"/>
<oslc:resourceType rdf:resource="http://open-services.net/ns/rm#Requirement"/>
<oslc:hintHeight>530px</oslc:hintHeight>
<oslc:hintWidth>600px</oslc:hintWidth>
<oslc:dialog rdf:resource="https://jazz.ibm.com:9443/rm/pickers/com.ibm.rdm.web.CreateArtifactPicker?projectURL=https%3A%2F%2Fjazz.ibm.com%3A9443%2Frm%2Frm-projects%2F-_28tkB6Eeuh3Iiax2L3Ow"/>
<oslc:label>Requirement</oslc:label>
<dcterms:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>Requirement Creation</dcterms:title>
</oslc:Dialog>
</oslc:creationDialog>
</oslc:Service>
</oslc:service>
<oslc:service>
<oslc:Service>
<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%2FJ_JEEB6Eeuh3Iiax2L3Ow"/>
<dcterms:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>View Definition Query Capability</dcterms:title>
</oslc:QueryCapability>
</oslc:queryCapability>
<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/reqif#ReqIFDefinition"/>
<oslc:queryBase rdf:resource="https://jazz.ibm.com:9443/rm/reqif_oslc/definitions/query?componentURI=https%3A%2F%2Fjazz.ibm.com%3A9443%2Frm%2Fcm%2Fcomponent%2FJ_JEEB6Eeuh3Iiax2L3Ow"/>
<dcterms:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>ReqIF Definition Query Capability</dcterms:title>
</oslc:QueryCapability>
</oslc:queryCapability>
<oslc:creationFactory>
<oslc:CreationFactory>
<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/reqif#ReqIFExport"/>
<oslc:creation rdf:resource="https://jazz.ibm.com:9443/rm/reqif_oslc/export?componentURI=https%3A%2F%2Fjazz.ibm.com%3A9443%2Frm%2Fcm%2Fcomponent%2FJ_JEEB6Eeuh3Iiax2L3Ow"/>
<dcterms:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>ReqIF Export Factory</dcterms:title>
</oslc:CreationFactory>
</oslc:creationFactory>
<oslc:creationFactory>
<oslc:CreationFactory>
<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/reqif#ReqIFDefinition"/>
<oslc:creation rdf:resource="https://jazz.ibm.com:9443/rm/reqif_oslc/definitions?componentURI=https%3A%2F%2Fjazz.ibm.com%3A9443%2Frm%2Fcm%2Fcomponent%2FJ_JEEB6Eeuh3Iiax2L3Ow"/>
<dcterms:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>ReqIF Definition Factory</dcterms:title>
</oslc:CreationFactory>
</oslc:creationFactory>
<oslc:creationFactory>
<oslc:CreationFactory>
<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/reqif#ReqIFPackage"/>
<oslc:creation rdf:resource="https://jazz.ibm.com:9443/rm/reqif_oslc/import?componentURI=https%3A%2F%2Fjazz.ibm.com%3A9443%2Frm%2Fcm%2Fcomponent%2FJ_JEEB6Eeuh3Iiax2L3Ow"/>
<dcterms:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>ReqIF Package Factory</dcterms:title>
</oslc:CreationFactory>
</oslc:creationFactory>
<oslc:creationFactory>
<oslc:CreationFactory>
<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/reqif#ReqIFImport"/>
<oslc:creation rdf:resource="https://jazz.ibm.com:9443/rm/reqif_oslc/import?componentURI=https%3A%2F%2Fjazz.ibm.com%3A9443%2Frm%2Fcm%2Fcomponent%2FJ_JEEB6Eeuh3Iiax2L3Ow"/>
<dcterms:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>ReqIF Import Factory</dcterms:title>
</oslc:CreationFactory>
</oslc:creationFactory>
<oslc:domain rdf:resource="http://jazz.net/ns/rm/dng/reqif#"/>
</oslc:Service>
</oslc:service>
<dcterms:description rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>Service Descriptor for Project: rm_optout_p1</dcterms:description>
<jp10:supportLinkDiscoveryViaOSLCQueries rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean"
>true</jp10:supportLinkDiscoveryViaOSLCQueries>
<jp10:supportContributionsToLinkIndexProvider rdf:datatype=
<oslc:details rdf:resource="https://jazz.ibm.com:9443/rm/process/project-areas/-_28tkB6Eeuh3Iiax2L3Ow"/>
<jp10:supportOSLCSimpleQuery rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean"
>true</jp10:supportOSLCSimpleQuery>
<dcterms:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>rm_optout_p1</dcterms:title>
<rm:home rdf:resource="https://jazz.ibm.com:9443/rm/web#action=com.ibm.rdm.web.pages.showFoundationProjectDashboard&componentURI=https%3A%2F%2Fjazz.ibm.com%3A9443%2Frm%2Frm-projects%2F-_28tkB6Eeuh3Iiax2L3Ow%2Fcomponents%2FJ_JEEB6Eeuh3Iiax2L3Ow"/>
</oslc:ServiceProvider>
</rdf:RDF>
Jean-François CHAPELLE selected this answer as the correct answer
|
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.