Search code examples
odata

what is the significance of $ref in Odata 4


I am bit new to OData world

  1. can someone help me understand what does $ref signifies in OData 4,
  2. what is difference between $ref and $expand ?

Solution

  • Ananth

    The $expand system query option specifies the related resources or media streams to be included in line with retrieved resources. You can refer to https://docs.oasis-open.org/odata/odata/v4.01/cs01/part2-url-conventions/odata-v4.01-cs01-part2-url-conventions.html#sec_SystemQueryOptionexpand for $expand detail.

    The $ref is a path segment which is used to address references between entities. You can refer to: https://docs.oasis-open.org/odata/odata/v4.01/cs01/part2-url-conventions/odata-v4.01-cs01-part2-url-conventions.html#sec_AddressingReferencesbetweenEntities for $ref detail.