Versions Compared

Key

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

...

Region Management

Create region 

memberStatuses { "server-1" : { "success" : true, "message" : "success" } }, "statusCode" : "OK", "statusMessage" : "successfully persisted config for cluster", "successful" : true } UNAUTHENTICATEDAuthentication error. Please check your credentialsUNAUTHORIZEDuser not authorized for DATA:MANAGE
APISample Request BodyStatus 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 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
languagejava
titleSuccess Response
{
	"
name"
: "reginoA",
	"type": "REPLICATE"
}


200


Code Block
languagejava
titleSuccess Response
{
	"memberStatuses": [{
		"memberName": "server-2",
		"success": true,
		"message": "Region successfully created."
	}, {
		"memberName": "server-3",
		"success": true,
		"message": "Region successfully created."
	}],
	"statusCode": "OK",
	"statusMessage": "Successfully updated config for group2",
	"uri": "/management/v2/regions/disJoint",
	"result": []
}



409409
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 parameterName conflict
{
  "memberStatuses" : { },
  "statusCode" : "ILLEGALENTITY_ARGUMENTEXISTS",
  "statusMessage" : "Namecache ofelement theFoo region has to be specifiedalready exists.",
  "successful" : false
}



400


Code Block
languagejava
titleError Response -
invalid
missing required parameter
{
  "memberStatuses" : { },
  "statusCode" : "ILLEGAL_ARGUMENT",
  "statusMessage" : "
Region
Name 
names
of 
may
the 
not
region 
begin
has 
with
to 
a double-underscore: __Foo__
be specified.",
  "successful" : false
}
401


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



401


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



500403


Code Block
languagejava
titleError Response
{
  "memberStatuses" : { },
  "statusCode" : "ERRORUNAUTHORIZED",
  "statusMessage" : "clusteruser persistencenot serviceauthorized is not runningfor DATA:MANAGE",
  "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



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 Region

APIStatus CodeResponse Body
APIStatus CodeResponse Body

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

Method: GET

Headers: Authorization



200


Code Block
languagejava
titleSuccess Response
{
    "Total_results	"statusCode": 10"OK",
    "Regions" : [
     {
       "Name": "Foo",
       "Url": "/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 

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

Method: GET

Headers: Authorization

APIStatus CodeResponse Body

200

Code Block
languagejava
titleSuccess Response
{
    "Name": "Foo",
    "Data_Policy": "partition",
    "Hosting_Members": [
      "s1",
      "s2",
      "s3"
      ],
    "Size": 0,
    "Indices": [
     {
     "Id": 111,
     "Url": "/geode/v2/regions/Customer/index/111"
     }
    ]
	"result": [{
		"config": {
			"class": "org.apache.geode.cache.configuration.RegionConfig",
			"groups": ["group2"],
			"regionAttributes": {
				"dataPolicy": "PARTITION",
				"concurrencyChecksEnabled": true
			},
			"name": "customers2",
			"type": "PARTITION",
			"uri": "/management/v2/regions/customers2"
		},
		"runtimeInfo": [{
			"class": "org.apache.geode.management.runtime.RuntimeRegionInfo",
			"entryCount": 0
		}]
	}, {
		"config": {
			"class": "org.apache.geode.cache.configuration.RegionConfig",
			"groups": ["group2", "group1"],
			"regionAttributes": {
				"dataPolicy": "PARTITION",
				"concurrencyChecksEnabled": true
			},
			"name": "customers3",
			"type": "PARTITION",
			"uri": "/management/v2/regions/customers3"
		},
		"runtimeInfo": [{
			"class": "org.apache.geode.management.runtime.RuntimeRegionInfo",
			"entryCount": 0
		}]
	}]
}


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



Get Region

Code Block
languagejava
titleError Response
{
     "message": "Region with name '/Foo' does not exist"
}
APIStatus CodeResponse Body

Endpoint

Update End Point (not implemented)

Endpoint PATCHBody:Request Body regionConfig{ "gateway_sender_id"1","2"] } }
APIStatus CodeResponse Body

GET

Headers: Authorization



200


Code Block
languagejava
title
Success Response
{
	"
statusCode": 
"OK",
	"result": [

200

Code Block
languagejava
titleSuccess Response
{
  "Metadata{
		"config": {
    "Url			"class": "/geode/v2/regions/Foo"
  }
}org.apache.geode.cache.configuration.RegionConfig",
			"groups": ["group2"],
			"regionAttributes": {
				"dataPolicy": "PARTITION",
				"concurrencyChecksEnabled": true
			},
			"name": "Foo",
			"type": "PARTITION",
			"uri": "/management/v2/regions/Foo"
		},
		"runtimeInfo": [{
			"class": "org.apache.geode.management.runtime.RuntimeRegionInfo",
			"entryCount": 0
		}]
	}]
}


401400
Code Block
languagejava
titleError Response
{
    "message": "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
Code Block
languagejava
titleError Response
{
    "message": "Region with name '/Foo' does not exist"
}
500


Code Block
languagejava
titleError Response
{
    "message": "FailedMissing toauthentication update region /Foo because of <reason>credential header(s)"
}

Delete End Point

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

Method: DELETE

Headers: Authorization


403
APIStatus CodeResponse Body

204

<Successful deletion>

304


Code Block
languagejava
titleError Response
{
    "message": "RegionUser1 withnot name '/Foo' does not existauthorized for CLUSTER:READ"
}


401404


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



Delete End Point

code500 Failedto delete region /Foo because of <reason>" }
API
languagejava
titleError Response
{
    "message": "User1 not authorized for DATA:MANAGE"
}
Status CodeResponse Body

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

Method: DELETE

Headers: Authorization



204


Code Block
languagejava
titleError Response
{
	"memberStatuses": [{
		"memberName": 
"server-1",
		"success": true,
		"message": "
Region 

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

200Success "memberStatuses
successfully deleted."
	}, {
		"memberName": "server-3",
		"success": true,
		"message": "Region successfully deleted."
	}],
	"statusCode": "OK",
	"statusMessage": "Successfully removed config for [group1]",
	"result": []
}


304


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


401
APIStatus CodeResponse Body

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

Method: GET

Headers: Authorization

Permission Required: CLUSTER:READ


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


403


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


500


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


Member Management

List members end point

{ "memberStatuses": {}, "statusCode": "OK", "statusMessage": null, "result": [{ "class": "org.apache.geode.management.configuration.MemberConfig", "idhost19.10pid51877", "cacheServers": [{...}]locatorfalsecoordinatorfalse }] }
APIStatus CodeResponse Body

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

Method: GET

Headers: Authorization

Permission Required: CLUSTER:READ

200


Code Block
languagejava
titleSuccess Response
{
	"statusCode": "OK",
	"result": [{
		"config": {
			"class": "org.apache.geode.management.configuration.MemberConfig"
		},
		"runtimeInfo": [{
			"class": "org.apache.geode.management.runtime.MemberInformation",
			"name": "locator-0",
			"id": "10.118.20.127(locator-0:4317:locator)<ec><v0>:41001",
			"workingDirPath": "/Users/jiliao/projects/geode/geode-assembly/dunit/vm0",
			"logFilePath": "/Users/jiliao/projects/geode/geode-assembly/dunit/vm0",
			"statArchiveFilePath": "/Users/jiliao/projects/geode/geode-assembly/dunit/vm0",
			"locators{},
	"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.1020.127[64759]",
			"pidheapUsage": "51877"209,
			"cacheServersmaxHeapSize": [{...}]480,
			"locatorinitHeapSize": false512,
			"coordinatorcacheXmlFilePath": false,
        "usedHeap": 510,
        "groups": ["group-1", "group-2"],
        "clientConnections": 5,
		"workingDirectory": "/var/vcap/sys/log/something"/Users/jiliao/projects/geode/geode-assembly/dunit/vm0",
			"host": "10.118.20.127",
			"processId": 4317,
			"locatorPort": 64759,
			"httpServicePort": 22500,
			"httpServiceBindAddress": "localhost",
			"logFileclientCount": "/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
languagejava
titleSuccess Response
0,
			"cpuUsage": 0.0,
			"webSSL": false,
			"coordinator": true,
			"secured": false,
			"server": false
		}, {
			"class": "org.apache.geode.management.runtime.MemberInformation",
			"name": "server-1",
			"
id": "10.118.
20.127(server-1:4318)<v1>:41002",
			"
workingDirPath": "
/Users/jiliao/projects/geode/geode-assembly/dunit/vm1",
			"logFilePath": "/Users/jiliao/projects/geode/geode-assembly/dunit/vm1",
			"
statArchiveFilePath": 
"/Users/jiliao/projects/geode/geode-assembly/dunit/vm1",
			"
locators": 

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

Method: GET

Headers: Authorization

Permission Required: CLUSTER:READ

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

Get members end point

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
	"localhost[64759]",
			"heapUsage": 107,
			"maxHeapSize": 491,
			"initHeapSize": 512,
			"cacheXmlFilePath": "/Users/jiliao/projects/geode/geode-assembly/dunit/vm1/cache.xml",
			"host": "10.118.20.127",
			"processId": 4318,
			"locatorPort": 0,
			"httpServicePort": 0,
			"clientCount": 0,
			"cpuUsage": 0.0,
			"webSSL": false,
			"coordinator": false,
			"secured": false,
			"server": true,
			"cacheServerInfo": [{
				"port": 64772,
				"maxConnections": 800,
				"maxThreads": 0,
				"running": true
			}]
		}]
	}]
}


Endpoint:http://locator:8080/geode-management/v2/members/Non-Existent?id=server-1

Method: GET

Headers: Authorization

Permission Required: CLUSTER:READ

404200


Code Block
languagejava
titleSuccess Response
{
	"memberStatusesstatusCode": {}"OK",
	"statusCoderesult": "ENTITY_NOT_FOUND",
	"statusMessage": "Unable to find the member with id = Non-Existent",
	"result": []
}

Index Management

List indexes

...

Endpoint:http://locator:8080/geode-management/v2/regions/{regionName}/indexes

Method: GET

Headers: Authorization

Permission Required: CLUSTER:READ

...

Get index

...

Endpoint:http://locator:8080/geode-management/v2/regions/{regionName}/indexes/{indexName}

Method: GET

Headers: Authorization

Permission Required: CLUSTER:READ

...

[{
		"config": {
			"class": "org.apache.geode.management.configuration.MemberConfig"
		},
		"runtimeInfo": [{
			"class": "org.apache.geode.management.runtime.MemberInformation",
			"name": "locator-0",
			"id": "10.118.20.127(locator-0:4317:locator)<ec><v0>:41001",
			"workingDirPath": "/Users/jiliao/projects/geode/geode-assembly/dunit/vm0",
			"logFilePath": "/Users/jiliao/projects/geode/geode-assembly/dunit/vm0",
			"statArchiveFilePath": "/Users/jiliao/projects/geode/geode-assembly/dunit/vm0",
			"locators": "10.118.20.127[64759]",
			"heapUsage": 209,
			"maxHeapSize": 480,
			"initHeapSize": 512,
			"cacheXmlFilePath": "/Users/jiliao/projects/geode/geode-assembly/dunit/vm0",
			"host": "10.118.20.127",
			"processId": 4317,
			"locatorPort": 64759,
			"httpServicePort": 22500,
			"httpServiceBindAddress": "localhost",
			"clientCount": 0,
			"cpuUsage": 0.0,
			"webSSL": false,
			"coordinator": true,
			"secured": false,
			"server": false
		}]
	}]
}


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

Method: GET

Headers: Authorization

Permission Required: CLUSTER:READ

200


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


Get members end point

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

{
	"statusCode": "OK",
	"result": [{
		"config": {
			"class": "org.apache.geode.management.configuration.MemberConfig"
		},
		"runtimeInfo": [{
			"class": "org.apache.geode.management.runtime.MemberInformation",
			"name": "locator-0",
			"id": "10.118.20.127(locator-0:4317:locator)<ec><v0>:41001",
			"workingDirPath": "/Users/jiliao/projects/geode/geode-assembly/dunit/vm0",
			"logFilePath": "/Users/jiliao/projects/geode/geode-assembly/dunit/vm0",
			"statArchiveFilePath": "/Users/jiliao/projects/geode/geode-assembly/dunit/vm0",
			"locators": "10.118.20.127[64759]",
			"heapUsage": 209,
			"maxHeapSize": 480,
			"initHeapSize": 512,
			"cacheXmlFilePath": "/Users/jiliao/projects/geode/geode-assembly/dunit/vm0",
			"host": "10.118.20.127",
			"processId": 4317,
			"locatorPort": 64759,
			"httpServicePort": 22500,
			"httpServiceBindAddress": "localhost",
			"clientCount": 0,
			"cpuUsage": 0.0,
			"webSSL": false,
			"coordinator": true,
			"secured": false,
			"server": false
		}]
	}]
}


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

Method: GET

Headers: Authorization

Permission Required: CLUSTER:READ

404


Code Block
languagejava
titleSuccess Response
{
	"memberStatuses": {},
	"statusCode": "ENTITY_NOT_FOUND",
	"statusMessage": "Unable to find the member with id = Non-Existent",
	"result": []
}



Index Management

List indexes

APIStatus CodeResponse Body

Endpoint:http://locator:8080/geode-management/v2/regions/{regionName}/indexes

Method: GET

Headers: Authorization

Permission Required: CLUSTER:READ

200


Code Block
languagejava
titleSuccess Response
{
	"statusCode": "OK",
	"result": [{
		"config": {
			"class": "org.apache.geode.cache.configuration.RegionConfig$Index",
			"name": "index1",
			"expression": "id",
			"fromClause": "/region1",
			"keyIndex": true,
			"type": "key",
			"regionName": "region1",
			"uri": "/management/v2/regions/region1/indexes/index1"
		}
	}, {
		"config": {
			"class": "org.apache.geode.cache.configuration.RegionConfig$Index",
			"name": "index2",
			"expression": "key",
			"fromClause": "/region1",
			"keyIndex": true,
			"type": "key",
			"regionName": "region1",
			"uri": "/management/v2/regions/region1/indexes/index2"
		}
	}]
}


Get index

APIStatus CodeResponse Body

Endpoint:http://locator:8080/geode-management/v2/regions/{regionName}/indexes/{indexName}

Method: GET

Headers: Authorization

Permission Required: CLUSTER:READ

200


Code Block
languagejava
titleSuccess Response
{
	"statusCode": "OK",
	"result": [{
		"config": {
			"class": "org.apache.geode.cache.configuration.RegionConfig$Index",
			"name": "index1",
			"expression": "id",
			"fromClause": "/region1",
			"keyIndex": true,
			"type": "key",
			"regionName": "region1",
			"uri": "/management/v2/regions/region1/indexes/index1"
		}
	}]
}



PDX Management

Configure PDX

APIRequest BodyStatus CodeResponse Body

Endpoint:http://locator:8080/geode-management/v2/configurations/pdx

Method: POST

Headers: Authorization

Permission Required: CLUSTER:MANAGE


Code Block
languagejava
titleSuccess Response
{"readSerialized":true}


200


Code Block
languagejava
titleSuccess Response
{
	"memberStatuses": [{
		"memberName": "server-1",
		"success": true,
		"message": "Server needs to be restarted for this configuration change to be realized."
	}],
	"statusCode": "OK",
	"statusMessage": "Successfully updated config for cluster",
	"uri": "/management/v2/configurations/pdx",
	"result": []
}


PDX Management

Configure PDX

...

Endpoint:http://locator:8080/geode-management/v2/configurations/pdx

Method: POST

Headers: Authorization

Permission Required: CLUSTER:MANAGE

...

Gateway Management

List gateway receivers

APIStatus CodeResponse Body

Endpoint:http://locator:8080/geode-management/v2/gateways/receivers

Method: GET

Headers: Authorization

Permission Required: CLUSTER:READ

200

:READ

200


Code Block
languagejava
titleSuccess Response
{
	"memberStatuses": [{
		"memberName": "server-1",
		"success": true,
		"message": "success"
	}],
	"statusCode": "OK",
	"statusMessage": "Successfully updated config for group1",
	"uri": "/management/v2/gateways/receivers/group1",
	"result": []
}
{"statusCode":"OK","result":[{"class":"org.apache.geode.cache.configuration.GatewayReceiverConfig","startPort":"5000","bindAddress":"localhost","manualStart":false,"uri":"/gateways/receivers/cluster"}]}


Create gateway receiver

APIStatus CodeRequest BodyResponse Body

Endpoint:http://locator:8080/geode-management/v2/gateways/receivers

Method: POST

Headers: Authorization

Permission Required: CLUSTER:MANAGE

201

{"startPort":"5000","group":"group1"}


Code Block
languagejava
titleSuccess Response
{
	"memberStatuses": [{
		"memberName": "server-1"
:{
,
		"success": true,
		"message": "success"
	}
}
],
	"statusCode": "OK",
	"statusMessage": "Successfully updated config for group1",
"result":[{"class":"org.apache.geode.cache.configuration.GatewayReceiverConfig","startPort":"5000","endPort":"5500",

	"uri": "/management/v2/gateways/receivers/group1",
	"
group
result":
"group1"}]}
 []
}