REST gateway example: Inserting and getting data grid map entries

You can use the POST and GET HTTP methods to insert and get data grid map entries.

Example: Insert operation

Using the defined URI and data format, you can insert information in to the data grid. The following example inserts a key "bob" into the MyGrid grid and MyGrid map:
POST /resources/datacaches/MyGrid/MyGrid/bob 
Content-type: application/xml 
<mydata>this is some data</mydata> 

Example: Get operation

To retrieve that key that was inserted in the previous example, you can use the following URI:
GET /resources/datacaches/MyGrid/MyGrid/bob
You must run GET operations on an individual key. You cannot retrieve all map entries.
Parent topic: Developing data grid applications with the REST gateway
Related reference:
REST gateway: URI format
REST gateway: Data format
REST gateway: REST operations
REST gateway example: Clearing data grid map entries
REST gateway example: Creating dynamic maps
REST gateway example: Time to live (TTL) expiration
REST gateway: Security configuration
REST gateway: HTTP sessions and cookies