Class | Description |
---|---|
SpaceAPIController |
Spring MVC controller for the RESTful Space API
usage examples: GET: http://localhost:8080/rest/data/Item/_introduce_type?spaceid=customerid http://localhost:8080/rest/data/Item/1 http://192.168.9.47:8080/rest/data/Item/_criteria?q=data2='common' Limit result size: http://192.168.9.47:8080/rest/data/Item/_criteria?q=data2='common'&s=10 DELETE: curl -XDELETE http://localhost:8080/rest/data/Item/1 curl -XDELETE http://localhost:8080/rest/data/Item/_criteria?q=id=1 Limit result size: curl -XDELETE http://localhost:8080/rest/data/Item/_criteria?q=data2='common'&s=5 POST: curl -XPOST -d '[{"id":"1", "data":"testdata", "data2":"common", "nestedData" : {"nestedKey1":"nestedValue1"}}, {"id":"2", "data":"testdata2", "data2":"common", "nestedData" : {"nestedKey2":"nestedValue2"}}, {"id":"3", "data":"testdata3", "data2":"common", "nestedData" : {"nestedKey3":"nestedValue3"}}]' http://localhost:8080/rest/data/Item
The response is a json object: On Sucess: { "status" : "success" } If there is a data: { "status" : "success", "data" : {...} or [{...}, {...}] } On Failure: If Inner error (TypeNotFound/ObjectNotFound) then { "status" : "error", "error": { "message": "some error message" } } If it is a XAP exception: { "status" : "error", "error": { "java.class" : "the exception's class name", "message": "exception.getMessage()" } } |
Copyright © GigaSpaces.