$expand query parameter
- Last Updated: March 6, 2025
- 1 minute read
- Hybrid Data Pipeline
- Version 4.6
- Documentation
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:
https://<myserver>:<port>/api/odata/OracleDS/Customers?$expand=Orders
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:
https://<myserver>:<port>/api/odata/OracleDS/Customers?$expand=Orders/OrderItems