Metadata
Metadata
This option controls the metadata content in output entities. It is invented for development purposes, most of the cases setting its value to minimal or no is sufficient and it also improves output readability.
There are three types of metadata:
- full (default): the output contains the whole metadata.
- minimal: output's entity metadata contains only self URI and type name (actions and functions are hidden).
- no: the output does not contain entity metadata.
Following returns an entity without metadata content:
Copy
GET https://example.com/OData.svc/Root/Content('Cars')?metadata=no
🛈 Special characters should be URL encoded
$metadata
If the resource is $metadata
, the server returns the Service Metadata Document that exposes the data model of the service in XML or JSON. This document is the global (static) metadata that cannot contain content specific information e.g. expando (Content List) fields.
Instance specific metadata is available on a collection or entity: in this case the resource URI needs to end with the "/$metadata" segment.
Copy
GET https://example.com/OData.svc/Root/Content/Cars/$metadata
🛈 Special characters should be URL encoded