skip to main content
Structure of OData requests

Try DataDirect Cloud Now

Structure of OData requests

OData requests to a DataDirect Cloud Data Source must include authentication, the service root, and resource name. You can fetch single or multiple entities and related entities using entity addressing and the supported methods. While you can set some server-side behavior such as caching and paging in the Data Source definition, client-side options also allow you to control behaviors such as paging and response formatting.
The following are required:
Supply credentials for DataDirect Cloud and for the backend data store:
*The DataDirect Cloud user ID and password must be passed using HTTP basic authentication. The client encrypts the DataDirect Cloud user ID and password in the Authorization header.
*The credentials for your data store can be stored in the Data Source definition or passed as part of an OData request — using the ddcloud-datasource-user and the ddcloud-datasource-password headers, as described in Data Source User Header and Data Source Password Header.
*Service root and resource name
The location of the DataDirect Cloud service and the name of the OData-enabled Data Source definition (case insensitive) as displayed on the OData tab of your Data Source definition.
The following are optional:
*Entity addressing
Append entity addresses to the request after the Data Source name. Use the plural entity name defined in the schema map. For example, the following request fetches the employee record with a primary key of 27, from the EMPLOYEES table in the myoracletest2 Data Source.'27')
*Queries and operations
DataDirect Cloud supports OData edit, create, update and delete operations, see examples in the Formulating queries section.
* Headers
* Service URI and resource path in
* Response formatting