Service Document
The service root returns a JSON listing of all available resources (entity sets, singletons, and function imports).
URL
GET /odataResponse format
json
{
"@odata.context": "http://localhost/odata/$metadata",
"value": [
{
"name": "Products",
"kind": "EntitySet",
"url": "Products"
},
{
"name": "Settings",
"kind": "Singleton",
"url": "Settings"
}
]
}What is included
| Resource | Condition |
|---|---|
| Entity sets | Included when isIncludedInServiceDocument() returns true (default) |
| Singletons | Always included |
| Function imports | Included when isIncludedInServiceDocument() returns true (default: false) |
To exclude an entity set from the service document, pass includedInServiceDocument: false to the EntitySet constructor.
How UI5 uses it
SAP UI5 reads the service document to discover available entity sets and their URLs. The @odata.context link points the client to the $metadata document for schema discovery.