From 10fbdc5203df84f5220680e1ac8f9ec1e28c0e33 Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Fri, 26 May 2017 19:17:33 -0400 Subject: [PATCH] Migrate status APIs --- website/source/api/status.html.md | 73 +++++++++++++++++++++++ website/source/docs/http/status.html.md | 77 ------------------------- 2 files changed, 73 insertions(+), 77 deletions(-) create mode 100644 website/source/api/status.html.md delete mode 100644 website/source/docs/http/status.html.md diff --git a/website/source/api/status.html.md b/website/source/api/status.html.md new file mode 100644 index 000000000..f819f6299 --- /dev/null +++ b/website/source/api/status.html.md @@ -0,0 +1,73 @@ +--- +layout: api +page_title: Status - HTTP API +sidebar_current: api-status +description: |- + The /status endpoints query the Nomad system status. +--- + +# Status HTTP API + +The `/status` endpoints query the Nomad system status. + +## Read Leader + +This endpoint returns the address of the current leader in the region. + +| Method | Path | Produces | +| ------ | ---------------------------- | -------------------------- | +| `GET` | `/status/leader` | `application/json` | + +The table below shows this endpoint's support for +[blocking queries](/api/index.html#blocking-queries), +[consistency modes](/api/index.html#consistency-modes), and +[required ACLs](/api/index.html#acls). + +| Blocking Queries | Consistency Modes | ACL Required | +| ---------------- | ----------------- | ------------ | +| `NO` | `all` | `none` | + +### Sample Request + +```text +$ curl \ + https://nomad.rocks/v1/status/leader +``` + +### Sample Response + +```json +"127.0.0.1:4647" +``` + +## List Peers + +This endpoint returns the set of raft peers in the region. + +| Method | Path | Produces | +| ------ | ---------------------------- | -------------------------- | +| `GET` | `/status/peers` | `application/json` | + +The table below shows this endpoint's support for +[blocking queries](/api/index.html#blocking-queries), +[consistency modes](/api/index.html#consistency-modes), and +[required ACLs](/api/index.html#acls). + +| Blocking Queries | Consistency Modes | ACL Required | +| ---------------- | ----------------- | ------------ | +| `NO` | `all` | `none` | + +### Sample Request + +```text +$ curl \ + https://nomad.rocks/v1/status/peers +``` + +### Sample Response + +```json +[ + "127.0.0.1:4647" +] +``` diff --git a/website/source/docs/http/status.html.md b/website/source/docs/http/status.html.md deleted file mode 100644 index 797d8875a..000000000 --- a/website/source/docs/http/status.html.md +++ /dev/null @@ -1,77 +0,0 @@ ---- -layout: "http" -page_title: "HTTP API: /v1/status/" -sidebar_current: "docs-http-status" -description: |- - The '/1/status/' endpoints are used to query the system status. ---- - -# /v1/status/leader - -By default, the agent's local region is used; another region can -be specified using the `?region=` query parameter. - -## GET - -
-
Description
-
- Returns the address of the current leader in the region. -
- -
Method
-
GET
- -
URL
-
`/v1/status/leader`
- -
Parameters
-
- None -
- -
Returns
-
- - ```javascript - "127.0.0.1:4647" - ``` - -
-
- -# /v1/status/peers - -## GET - -
-
Description
-
- Returns the set of raft peers in the region. -
- -
Method
-
GET
- -
URL
-
`/v1/status/peers`
- -
Parameters
-
- None -
- -
Returns
-
- - ```javascript - [ - "127.0.0.1:4647", - ... - ] - ``` - -
-
- -