Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: added rebalance operation

Table of Contents

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
languagejavayml
titleSuccess ResponseSample Request
{
	"name": "regionA",
	"type": "REPLICATE"
}


200


Code Block
languagejavayml
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
languagejavayml
titleName conflict
{
  "memberStatuses" : { },
  "statusCode" : "ENTITY_EXISTS",
  "statusMessage" : "cache element Foo already exists.",
  "successful" : false
}



400


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


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



401


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



403


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



500


Code Block
languagejavayml
titleError Response
{
  "memberStatuses" : { },
  "statusCode" : "ERROR",
  "statusMessage" : "cluster persistence service is not running",
  "successful" : false
}


...

APIStatus CodeResponse Body

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

Method: GET

Headers: Authorization



200


Code Block
languagejavayml
titleSuccess Response
{
	"statusCode": "OK",
	"result": [{
		"config": {
			"class": "org.apache.geode.cache.configuration.RegionConfig",
			"groups": ["group2"],
			"regionAttributes": {
				"dataPolicy": "PARTITION",
				"concurrencyChecksEnabled": true
			},
			"name": "customers2",
			"type": "PARTITION",
			"uri": "/management/experimental/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/experimental/regions/customers3"
		},
		"runtimeInfo": [{
			"class": "org.apache.geode.management.runtime.RuntimeRegionInfo",
			"entryCount": 0
		}]
	}]
}


401


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


403


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


...

APIStatus CodeResponse Body

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

Method: GET

Headers: Authorization



200


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


401


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


403


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


404


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



Delete

...

Region

APIStatus CodeResponse Body

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

Method: DELETE

Headers: Authorization



204


Code Block
languagejavayml
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 config for [group1]",
	"result": []
}


304


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


401


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


403


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


500


Code Block
languagejavayml
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

APIStatus CodeResponse Body

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

Method: GET

Headers: Authorization

Permission Required: CLUSTER:READ

200


Code Block
languagejavayml
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
		}, {
			"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": "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:7070/management/experimental/members?id=server-1

Method: GET

Headers: Authorization

Permission Required: CLUSTER:READ

200


Code Block
languagejavayml
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?id=Non-Existent

Method: GET

Headers: Authorization

Permission Required: CLUSTER:READ

200


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


Get

...

Member

APIStatus CodeResponse Body

Endpoint: http://locator:7070/management/experimental/members/server-1

Method: GET

Headers: Authorization

Permission Required: CLUSTER:READ

200


Code Block
languagejavayml
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
languagejavayml
titleSuccess Error Response
{
	"memberStatuses": {},
	"statusCode": "ENTITY_NOT_FOUND",
	"statusMessage": "Unable to find the member with id = Non-Existent",
	"result": []
}



Index Management

List

...

Indexes

APIStatus CodeResponse Body

Permission Required: CLUSTER:READ

200


Code Block
languagejavayml
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/experimental/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/experimental/regions/region1/indexes/index2"
		}
	}]
}


Get

...

Index

APIStatus CodeResponse Body

Permission Required: CLUSTER:READ

200


Code Block
languagejavayml
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/experimental/regions/region1/indexes/index1"
		}
	}]
}


...

APIRequest BodyStatus CodeResponse Body

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

Method: POST

Headers: Authorization

Permission Required: CLUSTER:MANAGE


Code Block
languagejavayml
titleSuccess ResponseSample Request
{"readSerialized":true}


200


Code Block
languagejavayml
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/experimental/configurations/pdx",
	"result": []
}


Gateway Management

List

...

Gateway Receivers

APIStatus CodeResponse Body

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

Method: GET

Headers: Authorization

Permission Required: CLUSTER:READ

200


Code Block
languagejavayml
titleSuccess Response
{
	"statusCode": "OK",
	"result": [{
		"config": {
			"class": "org.apache.geode.cache.configuration.GatewayReceiverConfig",
			"groups": ["group2"],
			"startPort": "5002",
			"endPort": "5500",
			"uri": "/management/experimental/gateways/receivers/group2"
		}
	}, {
		"config": {
			"class": "org.apache.geode.cache.configuration.GatewayReceiverConfig",
			"groups": ["group1"],
			"startPort": "5000",
			"endPort": "5500",
			"uri": "/management/experimental/gateways/receivers/group1"
		},
		"runtimeInfo": [{
			"class": "org.apache.geode.management.runtime.GatewayReceiverInfo",
			"memberName": "server-1",
			"running": true,
			"port": 5134
		}]
	}]
}


Create

...

Gateway Receiver

APIStatus CodeRequest BodyResponse Body

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

Method: POST

Headers: Authorization

Permission Required: CLUSTER:MANAGE

201


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



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


Rebalance Operation

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",
    }
  ]
}


Start Rebalance

APIStatus CodeRequest BodyResponse Body

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

Method: POST

Headers: Authorization

Permission Required: DATA:MANAGE

202


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




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


Get Rebalance

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