Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Region Management

Create

...

region 

APIStatus CodeResponse 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
languagejava
titleRequest Body
{
public enum 
"regionConfig":
RegionType {
  PARTITION,
  
"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
languagejava
titleRequest Body
public enum RegionType { PARTITION
PARTITION_REDUNDANT_PERSISTENT_OVERFLOW,
  PARTITION_HEAP_LRU,
  PARTITION_REDUNDANT_HEAP_LRU,

  PARTITION_PROXY,
  PARTITION_PROXY_REDUNDANT,

  
PARTITION_PERSISTENT
REPLICATE,
  
PARTITION
REPLICATE_
REDUNDANT_
PERSISTENT,
  
PARTITION
REPLICATE_OVERFLOW,
  
PARTITION
REPLICATE_
REDUNDANT
PERSISTENT_OVERFLOW,
  
PARTITION
REPLICATE_
PERSISTENT
HEAP_
OVERFLOW
LRU,

  
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 }
REPLICATE_PROXY
}


200


Code Block
languagejava
titleSuccess Response
{
  "memberStatuses" : {
    "server-1" : {
      "success" : true,
      "message" : "success"
    }
  },
  "statusCode" : "OK",
  "statusMessage" : "successfully persisted config for cluster",
  "successful" : 
200 Code Block
languagejava
titleSuccess Response
{ "memberStatuses" : { "server-1" : { "success" : true, "message" : "success" } }, "statusCode" : "OK", "statusMessage" : "successfully persisted config for cluster", "successful" :
true
}



409


Code Block
languagejava
titleName conflict
{
  "memberStatuses" : { },
  "statusCode" : "ENTITY_EXISTS",
  "statusMessage" : "cache element Foo already exists.",
  "successful" : false
}


400


Code Block
languagejava
titleError Response - missing required parameter
{
  "memberStatuses" : { },
  "statusCode" : "ILLEGAL_ARGUMENT",
  "statusMessage" : "Name of the region has to be specified.",
  "successful" : false
}


Code Block
languagejava
titleError Response - invalid parameter
{
  "memberStatuses" : { },
  "statusCode" : "ILLEGAL_ARGUMENT",
  "statusMessage" : "Region names may not begin with a double-underscore: __Foo__",
  "successful" : false
}


401


Code Block
languagejava
titleError Response
{
  "memberStatuses" : { },
  "statusCode" : "UNAUTHENTICATED",
  "statusMessage" : "Authentication error. Please check your credentials",
  "successful" : false
}


403


Code Block
languagejava
titleError Response
{
  "memberStatuses" : { },
  "statusCode" : "UNAUTHORIZED",
  "statusMessage" : "user not authorized for DATA:MANAGE",
  "successful" : false
}


500


Code Block
languagejava
titleError 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

members GET
APIStatus CodeResponse Body

regions

Method:

GET

Headers: Authorization



Permission Required: CLUSTER:READ

200


Code Block
languagejava
titleSuccess 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
languagejava
titleError Response
{
    "message": "Missing authentication credential header(s)"
}


403


Code Block
languagejava
titleError Response
{
    "message": "User1 not authorized for CLUSTER:READ"
}



Describe End Point 

clientConnections5, "workingDirectory": "/var/vcap/sys/log/something", "logFile": "/var/vcap/sys/log/server" }] }
APIStatus CodeResponse Body

Endpoint: http://locator:8080/geode-management/v2/regions/Foo

Method: GET

Headers: Authorization



200


Code Block
languagejava
titleSuccess 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
languagejava
titleError Response
{
    
"
message": 
"Missing authentication credential header(s)"
}


403


Code Block
languagejava
titleError 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
languagejava
titleSuccess 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)

APIStatus CodeResponse Body

Endpoint: http://locator:8080/geode-management/v2/regions/Foo

Method: PATCH

Headers: Authorization

Body:

Code Block
languagejava
titleRequest Body
{
  "regionConfig": {
      "gateway_sender_id": ["1","2"]
  }
}



200


Code Block
languagejava
titleSuccess Response
{
  "Metadata": {
    "Url": "/geode/v2/regions/Foo"
  }
}


400200


Code Block
languagejava
titleSuccess Error Response
{
	"memberStatuses    "message": {},
	"statusCode": "OK",
	"statusMessage": null,
	"result": []
}

Get members end point (Implemented) 

200Success "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 }] }
"Invalid parameter specified"
}


401


Code Block
languagejava
titleError Response
{
    "message": "Missing authentication credential header(s)"
}


403


Code Block
languagejava
titleError Response
{
    "message": "User1 not authorized for DATA:MANAGE"
}


404
APIStatus CodeResponse Body

Endpoint:http://locator:8080/geode-management/v2/members/server-1

Method: GET

Headers: Authorization

Permission Required: CLUSTER:READ


Code Block
languagejava
title
Error Response
{
    "message": 
"Region with name '/Foo' does not exist"
}



500


Code Block
languagejava
titleError Response
{
    "message": "Failed to update region /Foo because of <reason>"
}



Delete End Point

APIStatus CodeResponse Body

Endpoint: http://locator:8080/geode-management/v2/regions/Foo

Method: DELETE

Headers: Authorization



204

<Successful deletion>

304

Endpoint:http://locator:8080/geode-management/v2/members/Non-Existent

Method: GET

Headers: Authorization

Permission Required: CLUSTER:READ

404


Code Block
languagejava
titleSuccess Error Response
{
	"memberStatuses    "message": {},
	"statusCode": "ENTITY_NOT_FOUND",
	"statusMessage"Region with name '/Foo' does not exist"
}


401


Code Block
languagejava
titleError Response
{
    "message": "UnableMissing toauthentication find the member with id = Non-Existent",
	"result": []
}

List End Point

Endpoint: http://locator:8080/geode-management/v2/regions

Method: GET

Headers: Authorization

Success Total_results10, "Regions" : [ { "Name": "Foo", "Url": "/geode/v2/regions/Foo" }, ... ] }
credential header(s)"
}


403


Code Block
languagejava
titleError Response
{
    "message": "User1 not authorized for DATA:MANAGE"
}


500
APIStatus CodeResponse Body

200


Code Block
languagejava
title
Error Response
{
    "
message": 
"Failed to delete 
401
Code Block
languagejava
titleError Response
{
    "message": "Missing authentication credential header(s)"
}
403
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.


Member Management

List members end point (Implemented) 

APIStatus CodeResponse Body

Endpoint:http://locator:8080/geode-management/v2/members

Method: GET

Headers: Authorization

Permission Required: CLUSTER:READ

200


Code Block
languagejava
title
Error
Success Response
{
	"memberStatuses": {},
	"statusCode": 
"message
"OK",
	"statusMessage": null,
	"result": 
"User1 not authorized for CLUSTER:READ" }

Describe End Point 

APIStatus CodeResponse Body

Endpoint: http://locator:8080/geode-management/v2/regions/Foo

Method: GET

Headers: Authorization

200

Code Block
languagejava
titleSuccess 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,
        "
s1
usedHeap": 500,
        "groups": ["group-1", "
s2
group-2"],
        "
s3APIStatus CodeResponse Body
clientConnections"
], "Size": 0, "Indices": [ { "Id": 111, "Url": "/geode/v2/regions/Customer/index/111" } ] }401
Code Block
languagejava
titleError Response
{
    "message": "Missing authentication credential header(s)"
}
403
Code Block
languagejava
titleError Response
{
    "message": "User1 not authorized for CLUSTER:READ"
}
404
Code Block
languagejava
titleError 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/Foo

members?id=server-1

Method:

PATCH

 GET

Headers: Authorization

Body:

Permission Required: CLUSTER:READ

200


Code Block
languagejava
title
Request Body
Success Response
{
	"
regionConfig
memberStatuses": {
"gateway_sender_id
},
	"statusCode": 
[
"
1
OK",
	"
2
statusMessage"
] } }

200

Code Block
languagejava
titleSuccess Response
{ "Metadata
: null,
	"result": [{
"Url
		"class": "
/geode/v2/regions/Foo" } }400
Code Block
languagejava
titleError 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
languagejava
titleError Response
{
    "message": "Missing authentication credential header(s)"
}
403


Code Block
languagejava
title
Error
Success Response
{
"message
	"memberStatuses": 
"User1 not authorized for DATA:MANAGE" }404
Code Block
languagejava
titleError Response
{
    "message": "Region with name '/Foo' does not exist"
}
500
Code Block
languagejava
titleError Response
{
    "message": "Failed to update region /Foo because of <reason>"
}

Delete End Point

{},
	"statusCode": "OK",
	"statusMessage": null,
	"result": []
}


Get members end point (Implemented) 

APIStatus CodeResponse Body

Endpoint:http://locator:8080/geode-management/v2/members/server-1

Method: GET

Headers: Authorization

Permission Required: CLUSTER:READ

200


Code Block
languagejava
titleSuccess 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
APIStatus CodeResponse Body

Endpoint: http://locator:8080/geode-management/v2/regions/Foo

Method: DELETE

Headers: Authorization

204

<Successful deletion>

304
Code Block
languagejava
titleError Response
{
    "message": "Region with name '/Foo' does not exist"
}
401
Code Block
languagejava
titleError Response
{
    "message": "Missing authentication credential header(s)"
}
403


Code Block
languagejava
title
Error
Success Response
{
"message
	"memberStatuses": {},
	"statusCode": "
User1 not authorized for DATA:MANAGE" }500 Code Block
languagejava
titleError Response
{ "message
ENTITY_NOT_FOUND",
	"statusMessage": "
Failed
Unable to find 
delete
the 
region
member 
/Foo
with 
because
id 
of
= 
<reason>
Non-Existent",
}

...

	"result": []
}