I am having challenges with odata query to get derived type:
{{Url}}/odata/resource?$expand=derivedType
See this link which gives options like ~/People/OfTy
The information in that blog post is out of date. The official OData specifications are available at http://www.odata.org/documentation/.
In OData v4, you can filter by derived type by appending the fully-qualified name of the derived type to the resource URI path. For example, GET http://host/Employees/MyService.Manager
would retrieve the subset of Employees who are also Managers (assuming Manager is derived from Employee type). The prefix MyService
in the last path segment is the OData namespace in which the Manager
type is defined.
You can also filter by derived type when expanding a navigation property by appending the fully-qualified name of the derived type to the name of the property in an $expand
clause. For example, GET http://host/Companies('Acme')?$expand=Employees/MyService.Manager
would retrieve the Company named Acme with all Managers expanded inline.