Versions Compared

Key

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

...

APIStatus CodeResponse Body

Endpoint: http://locator:7070/management/experimental/regions

Method: POST

Headers: Authorization

Permission Required: DATA:MANAGE


Code Block
languageyml
titleSample Request
{
	"name": "regionA",
	"type": "REPLICATE"
}


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
}


201


Code Block
languageyml
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 configconfiguration for cluster.",
	"uri": "/management/experimental/regions/regionA"
}


409


Code Block
languageyml
titleName conflict
{
   "statusMessage" : "RegionConfig 'regionA' already exists on member(s) server-2.",
   "statusCode" : "ENTITY_EXISTS"
}


400


Code Block
languageyml
titleError Response - empty required parameter
{
  "statusCode" : "ILLEGAL_ARGUMENT",
  "statusMessage" : "RegionConfig identifier is required.",
}


Code Block
languageyml
titleError Response - invalid parameter
{
  "statusCode" : "ILLEGAL_ARGUMENT",
  "statusMessage" : "Region names may not begin with a double-underscore: __Foo",
}

Given an unknown input attribute, for example: foobar in: 

curl -d '{"name":"replicate2","type":"REPLICATE","foobar":"value"}' -H 'Content-Type: application/json' http://localhost:7070/management/experimental/regions

the output is:

{

   "statusCode" : "ILLEGAL_ARGUMENT",

   "statusMessage" : "JSON parse error: Unrecognized field \"foobar\" (class org.apache.geode.cache.configuration.RegionConfig), not marked as ignorable; nested exception is com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field \"foobar\" (class org.apache.geode.cache.configuration.RegionConfig), not marked as ignorable (9 known properties: \"indexes\", \"groups\", \"type\", \"regionAttributes\", \"customRegionElements\", \"regions\", \"entries\", \"name\", \"group\"])\n at [Source: (PushbackInputStream); line: 1, column: 59] (through reference chain: org.apache.geode.cache.configuration.RegionConfig[\"foobar\"])"

}


401


Code Block
languageyml
titleError Response - unauthenticated
{
  "statusCode" : "UNAUTHENTICATED",
  "statusMessage" : "Authentication error. Please check your credentials",
}


403


Code Block
languageyml
titleError Response - not authorized
{
  "statusCode" : "UNAUTHORIZED",
  "statusMessage" : "user not authorized for DATA:MANAGE",
}


500


Code Block
languageyml
titleError Response
{
  "statusCode" : "ERROR",
  "statusMessage" : "clusterCluster persistenceconfiguration service is not running.",
}


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/regions/Foo

Method: DELETE

Headers: Authorization



200


Code Block
languageyml
titleError Response
{
	"memberStatuses": [{
		"memberName": "server-1",
		"success": true,
		"message": "Region successfully deleted."
	}, {
		"memberName": "server-3",
		"success": true,
		"message": "Region successfully deleted."
	}],
	"statusCode": "OK",
	"statusMessage": "Successfully removed configconfiguration for [cluster]"
}


404


Code Block
languageyml
titleError Response
{
     "statusCode":"ENTITY_NOT_FOUND",
     "statusMessage":"RegionConfig 'Foo' does not exist."
}


401


Code Block
languageyml
titleError Response
{
  "statusCode" : "UNAUTHENTICATED",
  "statusMessage" : "Authentication error. Please check your credentials",
}


403


Code Block
languageyml
titleError Response
{
  "statusCode" : "UNAUTHORIZED",
  "statusMessage" : "user not authorized for DATA:MANAGE",
}


500


Code Block
languageyml
titleError Response
{
    "statusCode" : "ERROR",
    "statusMessage": "Failed to delete on all members."
}


...

APIStatus CodeResponse Body

Endpoint:http://locator:7070/management/experimental/configurations/pdx

Method: POST

Headers: Authorization

Permission Required: CLUSTER:MANAGE

Code Block
languageyml
titleSample Request
{"readSerialized":true}


200


Code Block
languageyml
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 configconfiguration for cluster.",
	"uri": "/management/experimental/configurations/pdx",
	"result": []
}


...

APIStatus CodeResponse Body

Endpoint: http://locator:7070/management/experimental/gateways/receivers

Method: POST

Headers: Authorization

Permission Required: CLUSTER:MANAGE

Code Block
languageyml
titleSample Request
{
 "startPort":"5000",
 "group":"group1"
}


201


Code Block
languageyml
titleSuccess Response
{
	"memberStatuses": [{
		"memberName": "server-1",
		"success": true,
		"message": "success"
	}],
	"statusCode": "OK",
	"statusMessage": "Successfully updated configconfiguration for group1.",
	"uri": "/management/experimental/gateways/receivers/group1",
	"result": []
}


...