Windchill REST Services Domain Capabilities > Examples for Basic REST Operations > Examples for the PTC Product Platform Management Domain > Querying Choices, Option Sets, Options, and Variant Specifications Using a Filter
Querying Choices, Option Sets, Options, and Variant Specifications Using a Filter
Example: Querying Choices Using a Filter on the ID property
The following examples show you how to query choices using a filter on the ID property. Use the following GET requests.
URI
GET /Windchill/servlet/odata/ProdPlatformMgmt/Choices?$filter=(ID eq ‘OR:com.ptc.windchill.option.model.Choice:165107’ or ID eq ‘OR:com.ptc.windchill.option.model.Choice:165122’)&$select=Name,State/Display
URI
GET /Windchill/servlet/odata/ProdPlatformMgmt/Choices?$filter=(ID eq ‘OR:com.ptc.windchill.option.model.Choice:165107’ or Name eq ‘Substation’)&$select=Name,State/Display
URI
GET /Windchill/servlet/odata/ProdPlatformMgmt/Choices?$filter=ID ne ‘OR:com.ptc.windchill.option.model.Choice:165107’&$orderby=Name&$select=Name,State/Display&$top=2&$count=true
URI
GET /Windchill/servlet/odata/ProdPlatformMgmt/Choices?$filter=ID ne ‘OR:com.ptc.windchill.option.model.Choice:165107’&$orderby=Name&$select=Name,State/Display&$skip=2&$top=2&$count=true
Example: Querying Options Using a Filter on the ID Property
The following examples show you how to query options using a filter on the ID property. Use the following GET requests.
URI
GET /Windchill/servlet/odata/ProdPlatformMgmt/Options?$filter=(ID eq ‘OR:com.ptc.windchill.option.model.Option:165127’ or ID eq ‘OR:com.ptc.windchill.option.model.Option:165194’)&$select=Identity
URI
GET /Windchill/servlet/odata/ProdPlatformMgmt/Options?$filter=(ID eq ‘OR:com.ptc.windchill.option.model.Option:165127’ or Name eq ‘Communication’)&$select=Identity
URI
GET /Windchill/servlet/odata/ProdPlatformMgmt/Options?$filter=ID ne ‘OR:com.ptc.windchill.option.model.Option:165127’&$select=Identity&orderby=Name&$top=2&$count=true
URI
GET /Windchill/servlet/odata/ProdPlatformMgmt/Options?$filter=ID ne ‘OR:com.ptc.windchill.option.model.Option:165127’&$select=Identity&orderby=Name&$skip=2&$top=2&$count=true
Example: Querying Option Sets Using a Filter on the ID Property
The following examples show you how to query option sets using a filter on the ID property. Use the following GET requests.
URI
GET /Windchill/servlet/odata/ProdPlatformMgmt/OptionSets?$filter=(ID eq ‘OR:com.ptc.windchill.option.model.OptionSet:165366’ or ID eq ‘OR:com.ptc.windchill.option.model.OptionSet:165888’)&$select=Name,Revision,State/Display
URI
GET /Windchill/servlet/odata/ProdPlatformMgmt/OptionSets?$filter=(ID eq ‘OR:com.ptc.windchill.option.model.OptionSet:165366’ or contains(Name,'Power'))&$select=Name,Revision,State/Display
URI
GET /Windchill/servlet/odata/ProdPlatformMgmt/OptionSets?$filter=ID ne ‘OR:com.ptc.windchill.option.model.OptionSet:165366’&$select=Name,Revision,State/Display&orderby=Name&$top=2&$count=true
URI
GET /Windchill/servlet/odata/ProdPlatformMgmt/OptionSets?$filter=ID ne ‘OR:com.ptc.windchill.option.model.OptionSet:165366’&$select=Name,Revision,State/Display&orderby=Name&$skip=2&$top=2&$count=true
Example: Querying Variant Specifications Using a Filter on the ID Property
The following examples show you how to query variant specifications using a filter on the ID property. Use the following GET requests.
URI
GET /Windchill/servlet/odata/ProdPlatformMgmt/VariantSpecifications?$filter=(ID eq ‘OR:com.ptc.wpcfg.doc.VariantSpec:164663’ or ID eq ‘OR:com.ptc.wpcfg.doc.VariantSpec:164668’)&$select=Number,Name,Version
URI
GET /Windchill/servlet/odata/ProdPlatformMgmt/VariantSpecifications?$filter=(ID eq ‘OR:com.ptc.wpcfg.doc.VariantSpec:164663’ or Number eq ‘00002’)&$select=Number,Name,Version
URI
GET /Windchill/servlet/odata/ProdPlatformMgmt/VariantSpecifications?$filter=ID ne ‘OR:com.ptc.wpcfg.doc.VariantSpec:164663’&$select=Number,Name,Version&$top=2&$orderby=Number&$count=true
URI
GET /Windchill/servlet/odata/ProdPlatformMgmt/VariantSpecifications?$filter=ID ne ‘OR:com.ptc.wpcfg.doc.VariantSpec:164663’&$select=Number,Name,Version&$orderby=Number&$skip=2&$top=2&$count=true
Example: Querying Choices Using a Filter on the CreatedBy or ModifiedBy Properties
The following examples show you how to query choices using a filter on the CreatedBy or ModifiedBy properties. Use the following GET requests.
URI
GET /Windchill/servlet/odata/ProdPlatformMgmt/Choices?$filter=contains(CreatedBy,'Admin')&$select=Name,State/Display,CreatedBy&$orderby=Name&$top=2&$count=true
URI
GET /Windchill/servlet/odata/ProdPlatformMgmt/Choices?$filter=contains(CreatedBy,'Admin’)&$select=Name,State/Display,CreatedBy&$orderby=Name&$skip=2&$top=2&$count=true
URI
GET /Windchill/servlet/odata/ProdPlatformMgmt/Choices?$filter=(State/Value eq ‘RELEASED’ and contains(ModifiedBy,'Admin'))&$select=Name,State/Display,ModifiedBy&$orderby=Name
Example: Querying Options Using a Filter on the CreatedBy or ModifiedBy Properties
The following examples show you how to query options using a filter on the CreatedBy or ModifiedBy properties. Use the following GET requests.
URI
GET /Windchill/servlet/odata/ProdPlatformMgmt/Options?$filter=contains(CreatedBy,'Admin')&$select=Identity,CreatedBy&$orderby=Identity&$top=2&$count=true
URI
GET /Windchill/servlet/odata/ProdPlatformMgmt/Options?$filter=contains(CreatedBy,'Admin')&$select=Identity,CreatedBy&$orderby=Identity&$skip=2&$top=2&$count=true
URI
GET /Windchill/servlet/odata/ProdPlatformMgmt/Options?$filter=(Required eq ‘false’ and contains(ModifiedBy,'Admin'))&$select=Identity,ModifiedBy&$orderby=Identity
Example: Querying Option Sets Using a Filter on the CreatedBy or ModifiedBy Properties
The following examples show you how to query option sets using a filter on the CreatedBy or ModifiedBy properties. Use the following GET requests.
URI
GET /Windchill/servlet/odata/ProdPlatformMgmt/OptionSets?$filter=contains(CreatedBy,'Admin')&$select=Name,Revision,CreatedBy&$orderby=Name&$top=2&$count=true
URI
GET /Windchill/servlet/odata/ProdPlatformMgmt/OptionSets?$filter=contains(CreatedBy,'Admin')&$select=Name,Revision,CreatedBy&$orderby=Name&$skip=2&$top=2&$count=true
URI
GET /Windchill/servlet/odata/ProdPlatformMgmt/OptionSets?$filter=(State/Value eq ‘RELEASED’ and contains(ModifiedBy,'Admin'))&$select=Name,Revision,State/Value,CreatedBy&$orderby=Name
Example: Querying Variant Specifications Using a Filter on the CreatedBy or ModifiedBy Properties
The following examples show you how to query variant specifications using a filter on the CreatedBy or ModifiedBy properties. Use the following GET requests.
URI
GET /Windchill/servlet/odata/ProdPlatformMgmt/VariantSpecifications?$filter=contains(CreatedBy,'demo')&$select=Number,Name,Version,CreatedBy&$orderby=Number&$top=2&$count=true
URI
GET /Windchill/servlet/odata/ProdPlatformMgmt/VariantSpecifications?$filter=contains(CreatedBy,'demo')&$select=Number,Name,Version,CreatedBy&$orderby=Number&$skip=2&$top=2&$count=true
URI
GET /Windchill/servlet/odata/ProdPlatformMgmt/VariantSpecifications?$filter=(contains(OptionSetReference,'Power') and contains(ModifiedBy,'Admin'))&$select=Number,Name,Version,ModifiedBy&$orderby=Number
URI
GET /Windchill/servlet/odata/ProdPlatformMgmt/VariantSpecifications/PTC.ProdPlatformMgmt.TestVariantSpec?$filter=contains(ModifiedBy,'demo')&$select=Number,Name,Version,ModifiedBy&$orderby=Number