Create region End Point (implemented)
API | Status Code | Response Body |
---|---|---|
Endpoint:http://locator:8080/geode-management/v2/regions Method: POST Headers: Authorization Permission Required: DATA:MANAGE Body: Request Body { "regionConfig": { "name": "Foo", "type": "REPLICATE", "group": "optional-group-name" } } Types supported by this Rest API is defined in RegionType: Request Body public enum RegionType { PARTITION, PARTITION_REDUNDANT, PARTITION_PERSISTENT, PARTITION_REDUNDANT_PERSISTENT, PARTITION_OVERFLOW, PARTITION_REDUNDANT_OVERFLOW, PARTITION_PERSISTENT_OVERFLOW, PARTITION_REDUNDANT_PERSISTENT_OVERFLOW, PARTITION_HEAP_LRU, PARTITION_REDUNDANT_HEAP_LRU, PARTITION_PROXY, PARTITION_PROXY_REDUNDANT, REPLICATE, REPLICATE_PERSISTENT, REPLICATE_OVERFLOW, REPLICATE_PERSISTENT_OVERFLOW, REPLICATE_HEAP_LRU, REPLICATE_PROXY } | 200 | Success Response { "memberStatuses" : { "server-1" : { "success" : true, "message" : "success" } }, "statusCode" : "OK", "statusMessage" : "successfully persisted config for cluster", "successful" : true } |
409 | Name conflict { "memberStatuses" : { }, "statusCode" : "ENTITY_EXISTS", "statusMessage" : "cache element Foo already exists.", "successful" : false } | |
400 | Error Response - missing required parameter { "memberStatuses" : { }, "statusCode" : "ILLEGAL_ARGUMENT", "statusMessage" : "Name of the region has to be specified.", "successful" : false } Error Response - invalid parameter { "memberStatuses" : { }, "statusCode" : "ILLEGAL_ARGUMENT", "statusMessage" : "Region names may not begin with a double-underscore: __Foo__", "successful" : false } | |
401 | Error Response { "memberStatuses" : { }, "statusCode" : "UNAUTHENTICATED", "statusMessage" : "Authentication error. Please check your credentials", "successful" : false } | |
403 | Error Response { "memberStatuses" : { }, "statusCode" : "UNAUTHORIZED", "statusMessage" : "user not authorized for DATA:MANAGE", "successful" : false } | |
500 | Error Response { "memberStatuses" : { }, "statusCode" : "ERROR", "statusMessage" : "cluster persistence service is not running", "successful" : false } |
Notes:
- the CREATE[POST] endpoint is not idempotent, you will receive a 409 when creating the a region with the same name the 2nd time.
- if group name is "cluster" or omitted, the region will be created on all the data members in this cluster.
401 and 403 responses are omitted for the rest of the end points.
List members end point (Implemented)
API | Status Code | Response Body |
---|---|---|
Permission Required: CLUSTER:READ | 200 | Success Response { "memberStatuses": {}, "statusCode": "OK", "statusMessage": null, "result": [{ "class": "org.apache.geode.management.configuration.MemberConfig", "id": "locator-0", "host": "10.118.19.10", "pid": "51876", "cacheServers": [{...}], "locator": true, "coordinator": true, "usedHeap": 500, "groups": ["group-1", "group-2"], "clientConnections": 5, "workingDirectory": "/var/vcap/sys/log/something", "logFile": "/var/vcap/sys/log/locator" }, { "class": "org.apache.geode.management.configuration.MemberConfig", "id": "server-1", "host": "10.118.19.10", "pid": "51877", "cacheServers": [{...}], "locator": false, "coordinator": false, "usedHeap": 510, "groups": ["group-1", "group-2"], "clientConnections": 5, "workingDirectory": "/var/vcap/sys/log/something", "logFile": "/var/vcap/sys/log/server" }] } |
Endpoint:http://locator:8080/geode-management/v2/members?id=server-1 Method: GET Headers: Authorization Permission Required: CLUSTER:READ | 200 | Success Response { "memberStatuses": {}, "statusCode": "OK", "statusMessage": null, "result": [{ "class": "org.apache.geode.management.configuration.MemberConfig", "id": "server-1", "host": "10.118.19.10", "pid": "51877", "cacheServers": [{...}], "locator": false, "coordinator": false }] } |
Endpoint:http://locator:8080/geode-management/v2/members?id=Non-Existent Method: GET Headers: Authorization Permission Required: CLUSTER:READ | 200 | Success Response { "memberStatuses": {}, "statusCode": "OK", "statusMessage": null, "result": [] } |
Get members end point (Implemented)
API | Status Code | Response Body |
---|---|---|
Permission Required: CLUSTER:READ | 200 | Success Response { "memberStatuses": {}, "statusCode": "OK", "statusMessage": null, "result": [{ "class": "org.apache.geode.management.configuration.MemberConfig", "id": "server-1", "host": "10.118.19.10", "pid": "51877", "cacheServers": [{...}], "locator": false, "coordinator": false }] } |
Endpoint:http://locator:8080/geode-management/v2/members/Non-Existent Method: GET Headers: Authorization Permission Required: CLUSTER:READ | 404 | Success Response { "memberStatuses": {}, "statusCode": "ENTITY_NOT_FOUND", "statusMessage": "Unable to find the member with id = Non-Existent", "result": [] } |
Root End Point (Not implemented)
API | Status Code | Response Body |
---|---|---|
200 | Success Response { "number_of_locators": 3, "number_of_servers": 8, "region_url": "/geode/v2/regions", "gateway_receiver_url": "/geode/v2/gwr", "gateway_sender_url": "/geode/v2/gws" } | |
401 | Error Response { "message": "Missing authentication credential header(s)" } | |
403 | Error Response { "message": "User1 not authorized for CLUSTER:READ" } |
List End Point
API | Status Code | Response Body |
---|---|---|
200 | Success Response { "Total_results": 10, "Regions" : [ { "Name": "Foo", "Url": "/geode/v2/regions/Foo" }, ... ] } | |
401 | Error Response { "message": "Missing authentication credential header(s)" } | |
403 | Error Response { "message": "User1 not authorized for CLUSTER:READ" } |
Describe End Point
API | Status Code | Response Body |
---|---|---|
200 | Success Response { "Name": "Foo", "Data_Policy": "partition", "Hosting_Members": [ "s1", "s2", "s3" ], "Size": 0, "Indices": [ { "Id": 111, "Url": "/geode/v2/regions/Customer/index/111" } ] } | |
401 | Error Response { "message": "Missing authentication credential header(s)" } | |
403 | Error Response { "message": "User1 not authorized for CLUSTER:READ" } | |
404 | Error Response { "message": "Region with name '/Foo' does not exist" } |
Update End Point (not implemented)
API | Status Code | Response Body |
---|---|---|
Endpoint: http://locator:8080/geode-management/v2/regions/Foo Method: PATCH Headers: Authorization Body: Request Body { "regionConfig": { "gateway_sender_id": ["1","2"] } } | 200 | Success Response { "Metadata": { "Url": "/geode/v2/regions/Foo" } } |
400 | Error Response { "message": "Invalid parameter specified" } | |
401 | Error Response { "message": "Missing authentication credential header(s)" } | |
403 | Error Response { "message": "User1 not authorized for DATA:MANAGE" } | |
404 | Error Response { "message": "Region with name '/Foo' does not exist" } | |
500 | Error Response { "message": "Failed to update region /Foo because of <reason>" } |
Delete End Point
API | Status Code | Response Body |
---|---|---|
204 | <Successful deletion> | |
304 | Error Response { "message": "Region with name '/Foo' does not exist" } | |
401 | Error Response { "message": "Missing authentication credential header(s)" } | |
403 | Error Response { "message": "User1 not authorized for DATA:MANAGE" } | |
500 | Error Response { "message": "Failed to delete region /Foo because of <reason>" } |
Note that the DELETE endpoint is idempotent – i.e. it should be a NOOP if the region does not exist.