The capability to query Windchill artifacts using OSLC vocabulary is declared on the Service Provider representing the Windchill product or library.
To determine the URL of the OSLC query capability:
<oslc:Service>
XML element whose <oslc:domain>
is
http://open-services.net/ns/cm#
or http://open-services.net/ns/am#
.<oslc:QueryCapability>
XML elements whose <oslc:resourceType>
is
http://open-services.net/ns/cm#ChangeRequest
or http://open-services.net/ns/am#Resource
.<oslc:queryBase>
XML element that defines the base URL for the query capability. For Change Management
domain, the URL of the queryBase element must contain the type of Change Artifacts (ChangeRequest, ChangeNotice or ProblemReport) as
a query parameter.<rdf:RDF ... <oslc:ServiceProvider rdf:about="https://SERVER:PORT/Windchill/oslc-connect/cm/provider?serviceProvider=PRODUCT_ID"> <oslc:service> <oslc:Service> <oslc:domain rdf:resource="http://open-services.net/ns/cm#"/> <oslc:queryCapability> <oslc:QueryCapability> <oslc:queryBase rdf:resource="https://SERVER:PORT/Windchill/oslc-connect/cm/query?serviceProvider=OR:wt.pdmlink.PDMLinkProduct:PRODUCT_ID;type=ChangeRequest"/> <oslc:resourceType rdf:resource="http://open-services.net/ns/cm#ChangeRequest"/> <oslc:resourceShape rdf:resource="https://SERVER:PORT/Windchill/oslc-connect/cm/resourceShape/WindchillChangeRequest/OR:wt.pdmlink.PDMLinkProduct:PRODUCT_ID"/> </oslc:QueryCapability> </oslc:queryCapability> </oslc:Service> </oslc:service> </rdf:Description> </rdf:RDF>
Some attributes in Windchill are based on Enumerations. When used in a query, the value of the attribute must be a URL. The list of allowed values (i.e. the URLs) and their display title are available in the ResourceShape whose URL is given in the Query Capability.
GET
Authorization
: Windchill user and password encoded as BASIC authenticationAccept
: application/xml
OSLC-Core-Version
: 2.0
<rdf:RDF ... <oslc:Property> <oslc:propertyDefinition rdf:resource="http://namespaces.sodius.com/windchill/cm/1.0#issuePriority"/> <oslc:representation rdf:resource="http://open-services.net/ns/core#Reference"/> <oslc:allowedValue> <j.0:AllowedValue rdf:about="https://SERVER:PORT/Windchill/oslc-connect/cm/resourceShape/WindchillProblemReport/OR:wt.pdmlink.PDMLinkProduct:PRODUCT_ID#issuePriority.RU1FUkdFTkNZ"> <dcterms:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Emergency</dcterms:title> </j.0:AllowedValue> </oslc:allowedValue> ... </rdf:RDF>
The query capability supports the syntax defined by the OSLC Query Specification. You should get familiar with this specification. The information provided below is a just a brief introduction of the general behavior of a query execution.
Refer to Mapping of Windchill attributes for OSLC Queries to understand which OSLC properties are supported and their corresponding Windchill attribute.
To execute an OSLC query:
GET
Authorization
: Windchill user and password encoded as BASIC authenticationAccept
: application/xml
OSLC-Core-Version
: 2.0
<rdf:RDF ... <oslc:ResponseInfo> <oslc:totalCount rdf:datatype="http://www.w3.org/2001/XMLSchema#int">22</oslc:totalCount>> </oslc:ResponseInfo> <rdf:Description rdf:about="windchill-query-base-url"> <rdfs:member> <oslc_cm:ChangeRequest rdf:about="windchill-artifact-url"> ... </oslc_cm:ChangeRequest> ... </rdfs:member> </rdf:Description> </rdf:RDF>
Below is the table of OSLC query parameters defined by the specification and the level of support in the connector.
Parameter | Supported | Description |
---|---|---|
oslc.where |
yes |
Support for immediate properties only; nested properties are not supported. |
oslc.searchTerms |
no |
|
oslc.orderBy |
no |
|
oslc.select |
yes |
Support for immediate properties only; nested properties are not supported. When not present, all properties of matching issues are returned. |
oslc.prefix |
yes |
This parameter is optional. All namespaces used in Mapping of Windchill attributes for OSLC Queries are automaticaly recognized. |
oslc.paging |
no |
Paging is not supported, only the first 50 results will be returned. |
oslc.pageSize |
no |
Below are typical queries you may execute:
Description | Parameters | Decoded Parameters |
---|---|---|
Artifacts using a given title |
oslc.where=dcterms%3Atitle%3D%22My%20Title%22
|
oslc.where=dcterms:title="My Title"
|
Artifacts whose title is in a given list |
oslc.where=dcterms%3Atitle%20in%20%5B%22TEST1%22%2C%22TEST2%22%5D
|
oslc.where=dcterms:title in ["TEST1","TEST2"]
|
Artifacts whose status is "In Progress" |
oslc.where=oslc_cm%3Ainprogress%3Dtrue
|
oslc.where=oslc_cm:inprogress=true
|
Resolved Artifacts |
oslc.where=oslc_cm%3Afixed%3Dtrue
|
oslc.where=oslc_cm:fixed=true
|
Resolved artifacts since a given date |
oslc.where=oslc_cm%3Afixed%3Dtrue%20and%20wc_cm%3AresolutionDate%20%3E%20%222023-11-20T10%3A29%3A00Z%22
|
oslc.where=oslc_cm:fixed=true and wc_cm:resolutionDate > "2023-11-20T10:29:02Z"
|
Artifacts having a specific OSLC link to a given resource |
oslc.where=oslc_cm%3AimplementsRequirement%3D%3Chttps%3A%2F%2FREMOTE%2Frm%2Fresources%2Fresource-id%3E
|
oslc.where=oslc_cm:implementsRequirement=<https://REMOTE/rm/resources/resource-id>
|
Artifacts having any OSLC link to a given resource |
oslc.where=*%3D%3Chttps%3A%2F%2FREMOTE%2Frm%2Fresources%2Fresource-id%3E
|
oslc.where=*=<https://REMOTE/rm/resources/resource-id>
|