Skip to main content

Fetch Multiple Related Tables in One API Call Using OData $expand in CData API Server

  • October 6, 2026
  • 0 replies
  • 5 views

Forum|alt.badge.img

Pulling a customer, their orders, and the products in each order often takes three or four separate API calls per screen. The result is slower load times and client-side code that's hard to maintain. With CData API Server, you define a relationship once and use the OData $expand keyword to return a parent row and its related child rows in a single request.

In this article, you'll learn how to:

  • Define one-to-many and many-to-one relationships on columns in API Server
  • Use $expand to return related tables in one call
  • Combine $expand with $select and $filter to control which columns and rows come back
  • Use pre-joined SQL views when your data needs three or more levels of depth

To learn more, read:

Fetch Multiple Related Tables in One API Call Using OData $expand in CData API Server