Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: removed "successful = false" lines

...

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
}


200


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 config for group2",
	"uri": "/management/experimental/regions/disJoint",
	"result": []
}


409


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


400


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


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


401


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


403


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


500


Code Block
languageyml
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/operations/rebalance

Method: POST

Headers: Authorization

Permission Required: DATA:MANAGE

Code Block
languageyml
titleSample Request
{
"excludeRegions": [],
"includeRegions": [],
"simulate": false
}


202


Code Block
languageyml
titleSuccess Response
{
  "statusCode": "ACCEPTED",
  "statusMessage": "async operation started (GET uri to check status)",
  "uri": "/management/experimental/operations/rebalance/8a70d6c4",
  "operationStart": "2019-07-25T10:17:42.004Z"
}


List Rebalance History

APIStatus CodeResponse Body

Endpoint: http://locator:7070/management/experimental/operations/rebalance

Method: GET

Headers: Authorization

Permission Required: DATA:MANAGE

200


Code Block
languageyml
titleSuccess Response
{
  "statusCode": "OK",
  "result": [
    {
      "statusCode": "OK",
      "statusMessage": "finished successfully",
      "uri": "/management/experimental/operations/rebalance/8a70d6c4",
      "operationStart": "2019-07-25T10:17:42.004Z",
      "operationEnded": "2019-07-25T10:17:42.060Z"
    },
    {
      "statusCode": "IN_PROGRESS",
      "statusMessage": "in progress",
      "uri": "/management/experimental/operations/rebalance/a7d6204c",
      "operationStart": "2019-07-26T04:57:22.534Z",
    }
  ]
}


Get Rebalance Status

APIStatus CodeResponse Body

Permission Required: DATA:MANAGE

200


Code Block
languageyml
titleSuccess Response
{
  "statusCode": "OK",
  "statusMessage": "finished successfully",
  "operationStart": "2019-07-25T10:17:42.004Z",
  "operationEnded": "2019-07-25T10:17:42.060Z",
  "result": {
    "rebalanceRegionResults": [
      {
        "regionName": "testRegion2",
        "bucketCreateBytes": 0,
        "bucketCreateTimeInMilliseconds": 0,
        "bucketCreatesCompleted": 0,
        "bucketTransferBytes": 0,
        "bucketTransferTimeInMilliseconds": 0,
        "bucketTransfersCompleted": 0,
        "primaryTransferTimeInMilliseconds": 0,
        "primaryTransfersCompleted": 0,
        "timeInMilliseconds": 17
      },
      {
        "regionName": "testRegion1",
        "bucketCreateBytes": 0,
        "bucketCreateTimeInMilliseconds": 0,
        "bucketCreatesCompleted": 0,
        "bucketTransferBytes": 0,
        "bucketTransferTimeInMilliseconds": 0,
        "bucketTransfersCompleted": 0,
        "primaryTransferTimeInMilliseconds": 0,
        "primaryTransfersCompleted": 0,
        "timeInMilliseconds": 5
      }
    ]
  }
}



404


Code Block
languageyml
titleSuccess Response
{
  "statusCode": "ENTITY_NOT_FOUND",
  "statusMessage": "Operation id = 12345678 not found"
}



500


Code Block
languageyml
titleSuccess Response
{
  "statusCode": "ERROR",
  "statusMessage": "rebalance returned info: Distributed system has no regions that can be rebalanced"
}


...