Pivotal GemFire® v8.2

PUT /gemfire-api/v1/{region}/{key}?op=REPLACE

PUT /gemfire-api/v1/{region}/{key}?op=REPLACE

Update (replace) data with key(s) if and only if the key(s) exists in region. The Key(s) must be present in the Region for the update to occur.

Resource URL



Parameter Description Example Values
op When you specify REPLACE for this parameter, data is only updated if the specified key or keys are already present in the region. REPLACE
@type Specified in the response body. Use this to declare the domain object type of the entry value. com.mycompany.ObjectName

Example Request

Request Payload: application/json
PUT //gemfire-api/v1/orders/2?op=REPLACE

Accept: application/json
Content-Type: application/json
     "@type":  "",
     "purchaseOrderNo": 1121,
     "customerId": 1012,
     "description":  "Order for XYZ Corp",
     "orderDate":  "02/10/2014",
     "deliveryDate":  "02/20/2014",
     "contact":  "Jelly Bean",
     "email":  "",
     "phone":  "01-2048096",
     "totalPrice": 225,
     "items": [
             "itemNo": 1,
             "description":  "Product-100",
             "quantity": 12,
             "unitPrice": 5,
             "totalPrice": 60

Example Success Response

Response Payload: null

200 OK

Error Codes

Status Code Description
400 BAD REQUEST Returned if the supplied key is not present in the region.
404 NOT FOUND Returned if the region is not found.
500 INTERNAL SERVER ERROR Error encountered at GemFire server. Check the HTTP response body for a stack trace of the exception.