Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: update address

...

Region Management

Create region 

APISample Request BodyStatus CodeResponse Body

Endpoint:http://locator:7070/management/experimental/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
}



Code Block
languagejava
titleSuccess Response
{
	"name": "regionA",
	"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/experimental/regions/disJoint",
	"result": []
}



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.

...

APIStatus CodeResponse Body

Endpoint:http://locator:7070/management/experimental/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:7070/management/experimental/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": []
}


...