Skip to content

Commit

Permalink
Synchronize documentation. (#262)
Browse files Browse the repository at this point in the history
Co-authored-by: Infinity Curator <[email protected]>
  • Loading branch information
writinwaters and Infinity Curator authored Oct 10, 2024
1 parent 63158f2 commit fd1bcbf
Showing 1 changed file with 11 additions and 36 deletions.
47 changes: 11 additions & 36 deletions website/docs/references/http_api_reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2641,7 +2641,7 @@ A `500` HTTP status code indicates an error condition. The response includes a J
**POST** `/admin/node/current`
Set a node role.
Sets role for a node.
### Request
Expand All @@ -2662,8 +2662,7 @@ curl --request POST \
'{
"role" : "follower",
"name" : "following",
"address" : "0.0.0.0",
"port" : 23851
"address" : "0.0.0.0:23851"
}'
```
Expand All @@ -2677,7 +2676,6 @@ curl --request POST \
- Parameter settings for setting a node to `follower` or `learner`:
- "name" Required : Name of the node in the cluster.
- "address" Required : Peer server address of the leader in the cluster.
- "port" Required : Peer server port of the leader in the cluster.
### Response
Expand Down Expand Up @@ -2726,7 +2724,7 @@ A `500` HTTP status code indicates an error condition. The response includes a J
**GET** `/admin/variables`
Show all node variables in admin mode.
Shows all node variables in admin mode.
### Request
Expand All @@ -2748,12 +2746,7 @@ None.
### Response
<Tabs
defaultValue="s200"
values={[
{label: 'Status code 200', value: 's200'},
]}>
<TabItem value="s200">
#### Status code 200
The response includes a JSON object like the following:
Expand All @@ -2767,14 +2760,13 @@ The response includes a JSON object like the following:
- `"error_code"`: `integer`
`0`: The operation succeeds.
</Tabs>
---
## Admin show node configs
**GET** `/admin/configs`
Show all node configs in admin mode.
Shows all node configs in admin mode.
### Request
Expand Down Expand Up @@ -2836,8 +2828,6 @@ The response includes a JSON object like the following:
}
```
</Tabs>
---
## Admin show node variable
Expand Down Expand Up @@ -2913,7 +2903,7 @@ The response includes a JSON object like the following:
**GET** `/admin/node/current`
Get information about the currently connected node.
Gets information about the currently connected node.
### Request
Expand All @@ -2934,12 +2924,8 @@ curl --request GET \
None.
### Response
<Tabs
defaultValue="s200"
values={[
{label: 'Status code 200', value: 's200'},
]}>
<TabItem value="s200">
#### Status code 200
The response includes a JSON object like the following:
Expand All @@ -2955,16 +2941,13 @@ The response includes a JSON object like the following:
- `"node_role": string`
The role of querying node.
</TabItem>
</Tabs>
---
## Admin show node
**GET** `/admin/node/{node_name}`
Get information about a node in the cluster.
Gets information about a node in the cluster.
### Request
Expand Down Expand Up @@ -3033,7 +3016,7 @@ A `500` HTTP status code indicates an error condition. The response includes a J
**GET** `/admin/nodes`
List all nodes in the cluster.
Lists all nodes in the cluster.
### Request
Expand All @@ -3055,12 +3038,7 @@ None.
### Response
<Tabs
defaultValue="s200"
values={[
{label: 'Status code 200', value: 's200'},
]}>
<TabItem value="s200">
#### Status code 200
The response includes a JSON object like the following:
Expand All @@ -3080,9 +3058,6 @@ The response includes a JSON object like the following:
- `"nodes" : array` :
Each element is in `[nodename, noderole]` format.
</TabItem>
</Tabs>
---

0 comments on commit fd1bcbf

Please sign in to comment.