ivankelly commented on a change in pull request #721: Issue 674: Documentation for HTTP endpoints URL: https://github.com/apache/bookkeeper/pull/721#discussion_r150515004
########## File path: site/docs/latest/admin/http.md ########## @@ -0,0 +1,317 @@ +--- +title: BookKeeper http endpoints +--- + +This document is to introducing BookKeeper http endpoints that could be used for BookKeeper administration. +If user want to use this feature, parameter "httpServerEnabled" need to be set to "true" in file conf/bk_server.conf. + +## All the endpoints + +Currently all the http endpoints could be divided into these 4 components: +1. Heartbeat: heartbeat for a specific bookie. +1. Config: doing the server configuration for a specific bookie. +1. Ledger: http endpoints related to ledgers. +1. Bookie: http endpoints related to bookies. +1. AutoRecovery: http endpoints related to auto recovery. + +## Heartbeat + +### Endpoint: /heartbeat +* Method: GET +* Description: Get heartbeat status for a specific bookie +* Response: + +| Code | Description | +|:-------|:------------| +|200 | Successful operation | + +## Config + +### Endpoint: /api/v1/config/server_config +1. Method: GET + * Description: Get value of all configured values overridden on local server config + * Response: + + | Code | Description | + |:-------|:------------| + |200 | Successful operation | + |403 | Don't have permission | + |404 | Error handling | +1. Method: PUT + * Description: Update a local server config + * Parameters: + + | Name | Type | Required | Description | + |:-----|:-----|:---------|:------------| + |configName | String | Yes | Configuration name(key) | + |configValue | String | Yes | Configuration value(value) | + * Body: + ```json + { + "configName1": "configValue1", + "configName2": "configValue2" + } + ``` + * Response: + + | Code | Description | + |:-------|:------------| + |200 | Successful operation | + |403 | Don't have permission | + |404 | Error handling | + +## Ledger + +### Endpoint: /api/v1/ledger/delete/?ledger_id=<ledger_id> +1. Method: DELETE + * Description: Delete a ledger. + * Parameters: + + | Name | Type | Required | Description | + |:-----|:-----|:---------|:------------| + |ledger_id | Long | Yes | ledger id of the ledger. | + * Response: + + | Code | Description | + |:-------|:------------| + |200 | Successful operation | + |403 | Don't have permission | + |404 | Error handling | + +### Endpoint: /api/v1/ledger/list/?print_metadata=<metadata> +1. Method: GET + * Description: List all the ledgers. + * Parameters: + + | Name | Type | Required | Description | + |:-----|:-----|:---------|:------------| + |metadata | Boolean | No | whether print out metadata | + * Response: + + | Code | Description | + |:-------|:------------| + |200 | Successful operation | + |403 | Don't have permission | + |404 | Error handling | + +### Endpoint: /api/v1/ledger/metadata/?ledger_id=<ledger_id> +1. Method: GET + * Description: Get the metadata of a ledger. + * Parameters: + + | Name | Type | Required | Description | + |:-----|:-----|:---------|:------------| + |ledger_id | Long | Yes | ledger id of the ledger. | + * Response: + + | Code | Description | + |:-------|:------------| + |200 | Successful operation | + |403 | Don't have permission | + |404 | Error handling | + +### Endpoint: /api/v1/ledger/read/?ledger_id=<ledger_id>&start_entry_id=<start_entry_id>&end_entry_id=<end_entry_id> +1. Method: GET Review comment: What format are these entries returned in? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services