skip to main content
Structure of OData requests : Service URI and resource path in
 

Try DataDirect Cloud Now

Service URI and resource path in

The service root and resource path of a request define the location of the service and the name of the OData-enabled Data Source definition (case insensitive).The OData tab of your Data Source definition provides this value in the Access URI field.
In the URL examples in this table,
<myserver> is the DNS name of the machine on which the server is installed.
<myds> is the name of your data source.
A request with just the Service URI and resource path returns a list of available entities, the $metadata parameter returns metadata on those entities, and an address that includes the plural entity name and a primary key value returns a single entity, as shown in the following examples:
Response contains:
Operation
URI
The names of all entities in the schema
GET
<myserver>:<port>/<myds>
Example: https://mustng02:8443/api/odata/myds
The names, properties, data types, and relationships for all entities in the schema
GET
<myserver>:<port>/<myds>/$metadata
Example: https://mustng02:8443/api/odata/myds/$metadata
A single entity
GET
<myserver>:<port>/<myds>/<entity_plural_name>('<primary_key_value>
Example: https://mustng02:8443/api/odata/myds/ACCOUNTS('123')
A single entity from a particular Data Source in a Data Source group
GET
<myserver>:<port>/<myds>/<ds_prefix>_<entity_plural_name>('<primary_key_value>
Example: https://mustng02:8443/api/odata/myds/east_ACCOUNTS('123')