Versions Compared

Key

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

Create region End Point (implemented)

APIStatus CodeResponse Body

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

Method: POST

Headers: Authorization

Permission Required: DATA:MANAGE

Body:

Code Block
languagejava
titleRequest Body
{
  "regionConfig": {
      "name": "Foo",
      "type": "REPLICATE",
      "group": "optional-group-name" 
  }
}


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
{
  "memberStatuses" : {
    "server-1" : {
      "success" : true,
      "message" : "success"
    }
  },
  "statusCode" : "OK",
  "statusMessage" : "successfully persisted config for cluster",
  "successful" : true
}



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
}


...

401 and 403 responses are omitted for the rest of the end points.

List members end point (Implemented) 

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
{
	"memberStatuses": {},
	"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.10",
		"pid": "51877",
		"cacheServers": [{...}],
		"locator": false,
		"coordinator": false,
        "usedHeap": 510,
        "groups": ["group-1", "group-2"],
        "clientConnections": 5,
		"workingDirectory": "/var/vcap/sys/log/something",
		"logFile": "/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
{
	"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
	}]
}


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 (Implemented) 

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


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": []
}



Root End Point (Not implemented)

APIStatus CodeResponse Body

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

Method: GET

Headers: Authorization



200


Code Block
languagejava
titleSuccess Response
{
    "number_of_locators": 3,
	"number_of_servers": 8,
	"region_url": "/geode/v2/regions",
	"gateway_receiver_url": "/geode/v2/gwr",
	"gateway_sender_url": "/geode/v2/gws"
}




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




List End Point

...

APIStatus CodeResponse Body

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

Method: GET

Headers: Authorization



200


Code Block
languagejava
titleSuccess Response
{
    "Total_results": 10,
    "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 

APIStatus CodeResponse Body

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

Method: GET

Headers: Authorization



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

}


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


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


Update End Point (not implemented)

APIStatus CodeResponse Body

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

Method: PATCH

Headers: Authorization

Body:

Code Block
languagejava
titleRequest Body
{
  "regionConfig": {
      "gateway_sender_id": ["1","2"]
  }
}



200


Code Block
languagejava
titleSuccess Response
{
  "Metadata": {
    "Url": "/geode/v2/regions/Foo"
  }
}


400


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": "Failed to update region /Foo because of <reason>"
}



Delete End Point

...

APIStatus CodeResponse Body

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

Method: DELETE

Headers: Authorization



204

<Successful deletion>

304


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


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


500


Code Block
languagejava
titleError Response
{
    "message": "Failed to delete region /Foo because of <reason>"
}


...