skip to main content
Querying with OData Version 2 : Formulating queries with OData Version 2 : Navigating relationships with OData Version 2 : $expand query parameter

Try Now
$expand query parameter
The examples in this topic use the following table structure:
Customer ---> Order ---> OrderItem
---> Contact
The $expand system query parameter allows the related information to be embedded in the response of the parent or child entity. For example, you can obtain a list of customers with a list of all of their orders by issuing the query:
Each customer entity in the response contains the list of order entities belonging to that customer embedded in the customer entity. Multiple tables can be expanded. The following query returns the list of customer entities; embedded in each customer entity is the list of their orders and the list of contacts for that customer.
https://<myserver>:<port>/api/odata/OracleDS/Customers?$expand=Orders, Contacts
Hybrid Data Pipeline currently only allows expanding to one level deep. For example, the following multi-level query, which attempts to expand orders and order items for a customer, is not currently supported: