Querying the CAD Documents Using a Filter
Example: Querying a Specific CAD Document Using a Filter on FileName
This example shows you how to query a specific CAD document using a filter based on document name. Use the following GET request.
URI
GET /Windchill/servlet/odata/CADDocumentMgmt/CADDocuments?$filter=FileName eq 'ABC.prt’ HTTP/1.1
Example: Querying Using a Filter on the ID property
The following examples show you how to query CAD documents using a filter on the ID property. Use the following GET requests.
URI
GET /Windchill/servlet/odata/CADDocumentMgmt/CADDocuments?$filter=(ID eq ‘OR:wt.epm.EPMDocument:111243’ or ID eq ‘OR:wt.epm.EPMDocument:111255’)&$select=Identity
URI
GET /Windchill/servlet/odata/CADDocumentMgmt/CADDocuments?$filter=(ID eq ‘OR:wt.epm.EPMDocument:111243’ or FileName eq ‘tensioner.asm’)&$select=Identity
URI
GET /Windchill/servlet/odata/CADDocumentMgmt/CADDocuments/PTC.CADDocumentMgmt.ECADDocument?$filter=ID ne ‘OR:wt.epm.EPMDocument:111243’&$select=FileName,Version&$orderby=FileName desc&$count=true
URI
GET /Windchill/servlet/odata/CADDocumentMgmt/CADDocuments/$filter=ID ne ‘OR:wt.epm.EPMDocument:111243’&$select=FileName,Version&$orderby=FileName desc&$top=25&$count=true
URI
GET /Windchill/servlet/odata/CADDocumentMgmt/CADDocuments/$filter=ID ne ‘OR:wt.epm.EPMDocument:111243’&$select=FileName,Version&$orderby=FileName desc&$skip=25&$top=25&$count=true
Example: Querying Using a Filter on the CreatedBy Property
The following examples show you how to query CAD documents using a filter on the CreatedBy property. Use the following GET requests.
URI
GET /Windchill/servlet/odata/CADDocumentMgmt/CADDocuments?$filter=contains(CreatedBy,'demo')&$select=Identity,LastModified,CreatedBy&$orderby=Identity&$top=25&$count=true
URI
GET /Windchill/servlet/odata/CADDocumentMgmt/CADDocuments?$filter=contains(CreatedBy,’demo’)&$select=Identity,LastModified,CreatedBy&$orderby=Identity&$skip=25&$top=25&$count=true
URI
GET /Windchill/servlet/odata/CADDocumentMgmt/CADDocuments?$filter=(Category/Value eq ‘CADASSEMBLY’ and contains(CreatedBy,'demo'))&$select=Identity,LastModified,CreatedBy&$orderby=Identity
Example: Querying Using a Filter on the ModifiedBy and CreatedBy Properties
The following examples show you how to query CAD documents using a filter on the ModifiedBy and CreatedBy properties. Use the following GET requests.
URI
GET /Windchill/servlet/odata/CADDocumentMgmt/CADDocuments/PTC.CADDocumentMgmt.ECADDocument?$filter=contains(ModifiedBy,'demo')&$select=Identity,LastModified,CreatedBy&$orderby=LastModified&$top=25&$count=true
URI
GET /Windchill/servlet/odata/CADDocumentMgmt/CADDocuments/PTC.CADDocumentMgmt.ECADDocument?$filter=contains(CreatedBy,'demo')&$select=Identity,LastModified,CreatedBy&$orderby=Identity&$skip=25&$top=25&$count=true
URI
GET /Windchill/servlet/odata/CADDocumentMgmt/CADDocuments?$filter=(AuthoringApplication/Value eq ‘PROE’ and contains(ModifiedBy,'demo'))&$select=Identity,LastModified,CreatedBy&$orderby=LastModified