Hi Andrew,
Mendix expects you to specify which attributes you need from the expanded entity.
For example. assume an OData API which provides endpoints for the Claims and Customer resources. You can retrieve claims with the associated customer as follows:
GET http://localhost:8080/odata/InsurancePortalApi/v1/Claims?$expand=Customer($select=CustomerId,Firstname)&$top=20&$count=true&$orderby=ClaimId asc&$select=ClaimId,Summary,ClaimFiledDate,TotalAmount,DateOfOccurence,ClaimStatus
or
POST http://localhost:8080/odata/InsurancePortalApi/v1/Claims/$query
Accept: application/json, application/atom+xml
Content-Type: text/plain
$expand=Customer($select=CustomerId,Firstname)&$top=20&$count=true&$orderby=ClaimId+asc&$select=ClaimId,Summary,ClaimFiledDate,TotalAmount,DateOfOccurence,ClaimStatus
Here are screenshots when you run it in visual studio code with the rest plugin (similar to postman):
As of Mendix 9.17 every OData API also includes an OpenAPI contract and a Swagger test page. This might be useful to explore OData APIs (but at the moment the expand support is not fully provided yet).
You can also expand more than one level. For example, assume Claims → Customer → Address:
POST http://localhost:8080/odata/InsurancePortalApi/v1/Claims/$query HTTP/1.1
User-Agent: vscode-restclient
Accept: application/json, application/atom+xml
Content-Type: text/plain
accept-encoding: gzip, deflate
content-length: 210
cookie: JSESSIONID=node0bspzqzi7bb5y10wofqpag1qu75.node0
$expand=Customer($select=CustomerId,Firstname;$expand=Address_2($select=AddressId,Street))&$top=20&$count=true&$orderby=ClaimId+asc&$select=ClaimId,Summary,ClaimFiledDate,TotalAmount,DateOfOccurence,ClaimStatus