Requesting service metadata and the service document
- Last Updated: March 6, 2025
- 1 minute read
- Hybrid Data Pipeline
- Version 4.6
- Documentation
Metadata for your OData service can be fetched by requesting the
service document or service metadata using a GET
request.
Service Document
GET request for the data source's service
root:<server>:<port>/api/odata4/<hdp_data_source>
For example:
https://MyServer:8443/api/odata4/myds/Service Metadata
Fetching service metadata returns a description of the data model for
the service, including the names, properties, data types, and relationships for all
entities in the schema. To fetch service metadata, issue a GET
request for the data source's service root with /$metadata appended
to the path:
<server>:<port>/api/odata4/<hdp_data_source>/$metadata
For example:
https://MyServer:8443/api/odata4/myds/$metadata
odata.metadata
parameter in the Accept header to determine the
level of control information returned for $metadata requests. For
example:GET https://MyServer:8443/api/odata4/myds/$metadata
OData-Version: 4.0
Content-Type: application/json;odata.metadata=full
Accept: application/jsonThe level of information returned can be set to full, minimal, or
none, depending on the needs of your
application. full provides the most annotations,
but at greater expense to the wire, while none
returns the fewest at the least expense. The following table provides a list of the
required annotations returned by level.
| Level | Annotations Returned |
|---|---|
full |
|
minimal
(default) |
|
none |
|