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: Code Block |
---|
language | java |
---|
title | Request Body |
---|
| {
"regionConfig": {
"name": "Foo",
"type": "REPLICATE",
"group": "optional-group-name"
}
} |
Types supported by this Rest API is defined in RegionType: Code Block |
---|
language | java |
---|
title | 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 |
Code Block |
---|
language | java |
---|
title | Success Response |
---|
| {
"memberStatuses" : {
"server-1" : {
"success" : true,
"message" : "success"
}
},
"statusCode" : "OK",
"statusMessage" : "successfully persisted config for cluster",
"successful" : true
}
|
|
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.
...
List members end point (Implemented)
API | Status Code | Response Body |
---|
Endpoint:http://locator:8080/geode-management/v2/members 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": "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",
" |
|
classorgapache.geode.management.configuration.MemberConfig"19.10",
"pid": "51877",
"cacheServers": [{...}],
" |
|
id"server-1"host"10.118.19.10",
"pid": "51877",
"cacheServers": [{...}] "usedHeap": 510,
"groups": ["group-1", "group-2"],
"clientConnections": 5,
" |
|
locatorfalse"/var/vcap/sys/log/something",
" |
|
coordinatorfalse"/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 |
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?id=Non-Existent Method: GET Headers: Authorization Permission Required: CLUSTER:READ | 200 |
Code Block |
---|
language | java |
---|
title | Success Response |
---|
| {
"memberStatuses": {},
"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 |
Code Block |
---|
language | java |
---|
title | 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 |
---|
Endpoint: http://locator:8080/geode-management/v2 Method: GET Headers: Authorization
| 200 |
Code Block |
---|
language | java |
---|
title | 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 |
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"
} |
|
List End Point (not implemented)
API | Status Code | Response Body |
---|
| 200 |
Code Block |
---|
language | java |
---|
title | Success Response |
---|
| {
"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)"
} |
|
403 |
Code Block |
---|
language | java |
---|
title | Error Response |
---|
| {
"message": "User1 not authorized for CLUSTER:READ"
} |
|
Describe End Point (Not Implemented)
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,
"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)
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"
}
} |
|
400 |
Code Block |
---|
language | java |
---|
title | Error Response |
---|
| {
"message": "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 |
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 (Not Implemented)
API | Status Code | Response Body |
---|
| 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)"
} |
|
403 |
Code Block |
---|
language | java |
---|
title | Error Response |
---|
| {
"message": "User1 not authorized for DATA:MANAGE"
} |
|
500 |
Code Block |
---|
language | java |
---|
title | 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.