Operations with the REST data service
After you start the eXtreme Scale REST data service, you can use any HTTP client to interact with it. A Web browser, PHP client, Java™ client or WCF Data Services client can be used to issue any of the supported request operations.
The REST service implements a subset of the Microsoft Atom Publishing Protocol: Data Services URI and Payload Extensions specification, Version 1.0 which is part of OData protocol. This topic describes which of the features of the specification are supported and how they are mapped to eXtreme Scale.
Service root URI
Microsoft WCF Data Services typically defines a service per data source or entity model. The eXtreme Scale REST data service defines a service per defined ObjectGrid. Each ObjectGrid that is defined in the eXtreme Scale ObjectGrid client override XML file is automatically exposed as a separate REST service root.
http://host:port/contextroot/restservice/gridname
Where:- contextroot is defined when you deploy the REST data service application, and depends on the application server
- gridname is the name of the ObjectGrid
Request types
The following list describes the Microsoft WCF Data Services request types which the eXtreme Scale REST data service supports. For details about each request type that WCF Data Services supports, see: MSDN: Request Types.
- Insert request types
-
Clients can insert resources using the POST HTTP verb with the following limitations:
- InsertEntity Request: Supported.
- InsertLink request: Supported.
- InsertMediaResource request: Not supported due to media resource support restriction.
- Update request types
-
Clients can update resources using the PUT and MERGE HTTP verbs with the following limitations:Note: The upsert and upsertAll methods replace the ObjectMap put and putAll methods. Use the upsert method to tell the BackingMap and loader that an entry in the data grid needs to place the key and value into the grid. The BackingMap and loader does either an insert or an update to place the value into the grid and loader. If you run the upsert API within your applications, then the loader gets an UPSERT LogElement type, which allows loaders to do database merge or upsert calls instead of using insert or update.
- UpdateEntity Request: Supported.
- UpdateComplexType Request: Not Supported due to complex type restriction.
- UpdatePrimitiveProperty Request: Supported.
- UpdateValue Request: Supported.
- UpdateLink Request: Supported.
- UpdateMediaResource Request: Not supported due to media resource support restriction.
- Delete request types
-
Clients can delete resources using the DELETE HTTP verb with the following limitations:
- DeleteEntity Request: Supported.
- DeleteLink Request: Supported.
- DeleteValue request: Supported.
- Retrieve request types
-
Clients can retrieve resources using the GET HTTP verb with the following limitations:
- RetrieveEntitySet Request: Supported.
- RetrieveEntity Request: Supported.
- RetrieveComplexType Request: Not supported due to complex type restriction.
- RetrievePrimitiveProperty Request: Supported.
- RetrieveValue Request: Supported.
- RetrieveServiceMetadata Request: Supported.
- RetrieveServiceDocument Request: Supported.
- RetrieveLink Request: Supported.
- Retrieve Request Containing a Customizable Feed Mapping: Not supported
- RetrieveMediaResource: Not supported due to media resource restriction.
- System query options
-
Queries are supported which allow clients to identify a collection of entities or a single entity. System query options are specified in a data service URI and are supported with the following limitations:
- $expand: Supported
- $filter: Supported.
- $orderby: Supported.
- $format: Not supported. The acceptable format is identified in the HTTP Accept request header.
- $skip: Supported
- $top: Supported
- Partition routing
-
Partition routing is based on the root entity. A request URI infers a root entity if its resource path starts with a root entity or with an entity that has a direct or indirect association to the entity. In a partitioned environment, any request that cannot infer a root entity will be rejected. Any request that infers a root entity will be routed to the correct partition.
For additional information on defining a schema with associations and root entities, see Scalable data model in eXtreme Scale and Partitioning.
Invoke request
Invoke requests are not supported. For additional information, see MSDN: Invoke Request.
Batch request
Clients can batch multiple Change Sets or Query Operations within a single request. This can reduce the number of round trips to the server and allows multiple requests to participate in a single transaction. For additional information, see MSDN: Batch Request.
Tunneled requests
Tunneled requests are not supported. For additional information, see MSDN: Tunneled Requests.