Region Management
Create
...
region
API | Status Code | Response Body |
---|
Endpoint:http://locator:8080/geode-management/v2/regions Method: POST Headers: Authorization Permission Required: DATA:MANAGE Body:
Types supported by this Rest API is defined in RegionType: Code Block |
---|
language | java |
---|
title | Request Body |
---|
|
|
{
"regionConfig": "name": "Foo"PARTITION_REDUNDANT,
PARTITION_PERSISTENT,
PARTITION_REDUNDANT_PERSISTENT,
|
|
"type": "REPLICATE"PARTITION_OVERFLOW,
PARTITION_REDUNDANT_OVERFLOW,
PARTITION_PERSISTENT_OVERFLOW,
|
|
"group": "optional-group-name"
}
}Types supported by this Rest API is defined in RegionType:
Code Block |
---|
language | java |
---|
title | Request Body |
---|
|
public enum RegionType {
PARTITIONPARTITION_REDUNDANT_PERSISTENT_OVERFLOW,
PARTITION_HEAP_LRU,
PARTITION_REDUNDANT_HEAP_LRU,
PARTITION_PROXY,
PARTITION_PROXY_REDUNDANT,
|
|
PARTITION_PERSISTENTPARTITIONREDUNDANT_PARTITIONPARTITIONREDUNDANTPARTITIONPERSISTENTOVERFLOWPARTITION_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 |
Code Block |
---|
language | java |
---|
title | Success Response |
---|
| {
"memberStatuses" : {
"server-1" : {
"success" : true,
"message" : "success"
}
},
"statusCode" : "OK",
"statusMessage" : "successfully persisted config for cluster",
"successful" : |
|
200 | Code Block |
---|
language | java |
---|
title | Success Response |
---|
|
{
"memberStatuses" : {
"server-1" : {
"success" : true,
"message" : "success"
}
},
"statusCode" : "OK",
"statusMessage" : "successfully persisted config for cluster",
"successful" : |
409 |
Code Block |
---|
language | java |
---|
title | Name conflict |
---|
| {
"memberStatuses" : { },
"statusCode" : "ENTITY_EXISTS",
"statusMessage" : "cache element Foo already exists.",
"successful" : false
} |
|
400 |
Code Block |
---|
language | java |
---|
title | Error Response - missing required parameter |
---|
| {
"memberStatuses" : { },
"statusCode" : "ILLEGAL_ARGUMENT",
"statusMessage" : "Name of the region has to be specified.",
"successful" : false
} |
Code Block |
---|
language | java |
---|
title | Error Response - invalid parameter |
---|
| {
"memberStatuses" : { },
"statusCode" : "ILLEGAL_ARGUMENT",
"statusMessage" : "Region names may not begin with a double-underscore: __Foo__",
"successful" : false
} |
|
401 |
Code Block |
---|
language | java |
---|
title | Error Response |
---|
| {
"memberStatuses" : { },
"statusCode" : "UNAUTHENTICATED",
"statusMessage" : "Authentication error. Please check your credentials",
"successful" : false
} |
|
403 |
Code Block |
---|
language | java |
---|
title | Error Response |
---|
| {
"memberStatuses" : { },
"statusCode" : "UNAUTHORIZED",
"statusMessage" : "user not authorized for DATA:MANAGE",
"successful" : false
} |
|
500 |
Code Block |
---|
language | java |
---|
title | 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
...
End Point
API | Status Code | Response Body |
---|
| members | GET GET Headers: Authorization
| Permission Required: CLUSTER:READ 200 |
Code Block |
---|
language | java |
---|
title | Success Response |
---|
| {
"memberStatuses "Total_results": {}10,
"statusCode": "OK",
"statusMessage": null,
"result"Regions" : [{
"class": "org.apache.geode.management.configuration.MemberConfig",
"id
{
"Name": "locator-0Foo",
"host "Url": "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/geode/v2/regions/Foo"
},
...
]
} |
|
401 |
Code Block |
---|
language | java |
---|
title | Error Response |
---|
| {
"message": "Missing authentication credential header(s)"
} |
|
403 |
Code Block |
---|
language | java |
---|
title | Error Response |
---|
| {
"message": "User1 not authorized for CLUSTER:READ"
} |
|
Describe End Point
API | Status Code | Response Body |
---|
| 200 |
Code Block |
---|
language | java |
---|
title | Success Response |
---|
| {
"Name": "Foo",
"Data_Policy": "partition",
"Hosting_Members": [
"s1",
"s2",
"s3"
],
"Size": 0,
"Indices": [
{
"Id": 111,
"usedHeapUrl": 510,"/geode/v2/regions/Customer/index/111"
}
"groups": ["group-1", "group-2"], ]
} |
|
401 |
Code Block |
---|
language | java |
---|
title | Error Response |
---|
| {
|
| | clientConnections | 5,
"workingDirectory": "/var/vcap/sys/log/something",
"logFile": "/var/vcap/sys/log/server"
}]
}
"Missing authentication credential header(s)"
} |
|
403 |
Code Block |
---|
language | java |
---|
title | Error Response |
---|
| {
"message": "User1 not authorized for CLUSTER:READ"
} |
|
404 | Endpoint:http://locator:8080/geode-management/v2/members?id=server-1 Method: GET Headers: Authorization Permission Required: CLUSTER:READ | 200 | | Code Block |
---|
language | java |
---|
title | Success Error 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 | "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: Code Block |
---|
language | java |
---|
title | Request Body |
---|
| {
"regionConfig": {
"gateway_sender_id": ["1","2"]
}
} |
| 200 |
Code Block |
---|
language | java |
---|
title | Success Response |
---|
| {
"Metadata": {
"Url": "/geode/v2/regions/Foo"
}
} |
|
400200 |
Code Block |
---|
language | java |
---|
title | Success Error Response |
---|
| {
"memberStatuses "message": {},
"statusCode": "OK",
"statusMessage": null,
"result": []
}
|
|
Get members end point (Implemented)
"Invalid parameter specified"
} |
|
401 |
Code Block |
---|
language | java |
---|
title | Error Response |
---|
| {
"message": "Missing authentication credential header(s)"
} |
|
403 |
Code Block |
---|
language | java |
---|
title | Error Response |
---|
| {
"message": "User1 not authorized for DATA:MANAGE"
} |
|
404 |
API | Status Code | Response Body |
---|
Endpoint:http://locator:8080/geode-management/v2/members/server-1 Method: GET Headers: Authorization Permission Required: CLUSTER:READ | 200 | | Success | "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
}]
}
"Region with name '/Foo' does not exist"
} |
|
500 |
Code Block |
---|
language | java |
---|
title | Error Response |
---|
| {
"message": "Failed to update region /Foo because of <reason>"
} |
|
Delete End Point
API | Status Code | Response Body |
---|
| 204 | |
304 | Endpoint:http://locator:8080/geode-management/v2/members/Non-Existent Method: GET Headers: Authorization Permission Required: CLUSTER:READ | 404 |
Code Block |
---|
language | java |
---|
title | Success Error Response |
---|
| {
"memberStatuses "message": {},
"statusCode": "ENTITY_NOT_FOUND",
"statusMessage"Region with name '/Foo' does not exist"
} |
|
401 |
Code Block |
---|
language | java |
---|
title | Error Response |
---|
| {
"message": "UnableMissing toauthentication find the member with id = Non-Existent",
"result": []
}
|
|
List End Point
|
403 |
Code Block |
---|
language | java |
---|
title | Error Response |
---|
| {
"message": "User1 not authorized for DATA:MANAGE"
} |
|
500 |
API | Status Code | Response Body |
---|
Endpoint: http://locator:8080/geode-management/v2/regions
Method: GET
Headers: Authorization
200 | | | Success | Total_results | 10,
| "Regions" : [
{
"Name": "Foo",
"Url": "/geode/v2/regions/Foo"
},
...
]
}401 | Code Block |
---|
language | java |
---|
title | Error Response |
---|
|
{
"message": "Missing authentication credential header(s)"
} |
403region /Foo because of <reason>"
} |
|
Note that the DELETE endpoint is idempotent – i.e. it should be a NOOP if the region does not exist.
Member Management
List members end point (Implemented)
Error | {
"memberStatuses": {},
"statusCode": |
|
"message"OK",
"statusMessage": null,
"result": |
|
"User1 not authorized for CLUSTER:READ"
} Describe End Point
API | Status Code | Response Body |
---|
Endpoint: http://locator:8080/geode-management/v2/regions/Foo
Method: GET
Headers: Authorization
200 | Code Block |
---|
language | java |
---|
title | Success Response |
---|
|
{
"Name": "Foo",
"Data_Policy": "partition",
"Hosting_Members": [[{
"class": "org.apache.geode.management.configuration.MemberConfig",
"id": "locator-0",
"host": "10.118.19.10",
"pid": "51876",
"cacheServers": [{...}],
"locator": true,
"coordinator": true,
" |
|
s1usedHeap": 500,
"groups": ["group-1", " |
|
s2s3API | Status Code | Response Body |
],
"Size": 0,
"Indices": [
{
"Id": 111,
"Url": "/geode/v2/regions/Customer/index/111"
}
]
}401 | Code Block |
---|
language | java |
---|
title | Error Response |
---|
|
{
"message": "Missing authentication credential header(s)"
} |
403 | Code Block |
---|
language | java |
---|
title | Error Response |
---|
|
{
"message": "User1 not authorized for CLUSTER:READ"
} |
404 | Code Block |
---|
language | java |
---|
title | Error Response |
---|
|
{
"message": "Region with name '/Foo' does not exist"
} |
Update End Point (not implemented)
: 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"
}]
}
|
|
regions/Foomembers?id=server-1 Method: |
PATCH GET Headers: Authorization |
Body:Permission Required: CLUSTER:READ | 200 | |
Request Body regionConfig
"gateway_sender_id[12]
}
}200 | Code Block |
---|
language | java |
---|
title | Success Response |
---|
|
{
"Metadata "Url/geode/v2/regions/Foo"
}
}400 | Code Block |
---|
language | java |
---|
title | Error Response |
---|
|
{
"message": "Invalid parameter specified"
} |
401 | 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 |
Code Block |
---|
language | java |
---|
title | Error Response |
---|
|
{
"message": "Missing authentication credential header(s)"
} |
403Error "message"User1 not authorized for DATA:MANAGE"
}404 | Code Block |
---|
language | java |
---|
title | Error Response |
---|
|
{
"message": "Region with name '/Foo' does not exist"
} |
500 | Code Block |
---|
language | java |
---|
title | Error Response |
---|
|
{
"message": "Failed to update region /Foo because of <reason>"
} |
Delete End Point
{},
"statusCode": "OK",
"statusMessage": null,
"result": []
}
|
|
Get members end point (Implemented)
API | Status Code | Response Body |
---|
Endpoint:http://locator:8080/geode-management/v2/members/server-1 Method: GET Headers: Authorization Permission Required: CLUSTER:READ | 200 |
Code Block |
---|
language | java |
---|
title | 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 |
API | Status Code | Response Body |
---|
Endpoint: http://locator:8080/geode-management/v2/regions/Foo
Method: DELETE
Headers: Authorization
204 | | 304 | Code Block |
---|
language | java |
---|
title | Error Response |
---|
|
{
"message": "Region with name '/Foo' does not exist"
} |
401 | Code Block |
---|
language | java |
---|
title | Error Response |
---|
|
{
"message": "Missing authentication credential header(s)"
} |
403Error "message "memberStatuses": {},
"statusCode": " |
|
User1 not authorized for DATA:MANAGE"
}500 | Code Block |
---|
language | java |
---|
title | Error Response |
---|
|
{
"messageENTITY_NOT_FOUND",
"statusMessage": " |
|
Faileddeleteregion/Foobecauseof<reason>}...