Skip to content

Commit 1e58a23

Browse files
authored
RS: Add DB stop_traffic & resume_traffic REST API request references (#750)
* DOC-4035 RS: Add DB stop_traffic & resume_traffic REST API request references * DOC-4035 Feedback update to add use cases for stop_traffic and resume_traffic actions * DOC-4035 Feedback updates to change stop_traffic/resume_traffic API descriptions
1 parent c6904e1 commit 1e58a23

File tree

3 files changed

+126
-0
lines changed

3 files changed

+126
-0
lines changed

content/operate/rs/references/rest-api/requests/bdbs/actions/_index.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,13 @@ weight: $weight
5050
|--------|------|-------------|
5151
| [GET]({{<relref "/operate/rs/references/rest-api/requests/bdbs/actions/recover#get-bdbs-actions-recover">}}) | `/v1/bdbs/{uid}/actions/recover` | Get database recovery plan |
5252
| [POST]({{<relref "/operate/rs/references/rest-api/requests/bdbs/actions/recover#post-bdbs-actions-recover">}}) | `/v1/bdbs/{uid}/actions/recover` | Recover database |
53+
54+
## Resume traffic
55+
| Method | Path | Description |
56+
|--------|------|-------------|
57+
| [POST]({{<relref "/operate/rs/references/rest-api/requests/bdbs/actions/resume_traffic#post-bdbs-actions-resume-traffic">}}) | `/v1/bdbs/{uid}/actions/resume_traffic` | Resume database traffic |
58+
59+
## Stop traffic
60+
| Method | Path | Description |
61+
|--------|------|-------------|
62+
| [POST]({{<relref "/operate/rs/references/rest-api/requests/bdbs/actions/stop_traffic#post-bdbs-actions-stop-traffic">}}) | `/v1/bdbs/{uid}/actions/stop_traffic` | Stop database traffic |
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
Title: Resume database traffic requests
3+
alwaysopen: false
4+
categories:
5+
- docs
6+
- operate
7+
- rs
8+
description: REST API requests to resume traffic for a database
9+
headerRange: '[1-2]'
10+
linkTitle: resume_traffic
11+
weight: $weight
12+
---
13+
14+
| Method | Path | Description |
15+
|--------|------|-------------|
16+
| [POST](#post-bdbs-actions-resume-traffic) | `/v1/bdbs/{uid}/actions/resume_traffic` | Resume database traffic |
17+
18+
## Resume database traffic {#post-bdbs-actions-resume-traffic}
19+
20+
```sh
21+
POST /v1/bdbs/{int: uid}/actions/resume_traffic
22+
```
23+
24+
Resume traffic handling for the database.
25+
26+
Use this action to resume read and write traffic on a database, where traffic was previously paused using the [`stop_traffic`]({{<relref "/operate/rs/references/rest-api/requests/bdbs/actions/stop_traffic">}}) action.
27+
28+
#### Required permissions
29+
30+
| Permission name | Roles |
31+
|-----------------|-------|
32+
| [update_bdb_with_action]({{< relref "/operate/rs/references/rest-api/permissions#update_bdb_with_action" >}}) | admin<br />cluster_member<br />db_member |
33+
34+
### Request {#post-request}
35+
36+
#### Example HTTP request
37+
38+
```sh
39+
POST /bdbs/1/actions/resume_traffic
40+
```
41+
42+
#### URL parameters
43+
44+
| Field | Type | Description |
45+
|-------|------|-------------|
46+
| uid | integer | The unique ID of the database. |
47+
48+
### Response {#post-response}
49+
50+
Returns a JSON object with an `action_uid`. You can track the action's progress with a [`GET /v1/actions/<action_uid>`]({{<relref "/operate/rs/references/rest-api/requests/actions#get-action">}}) request.
51+
52+
#### Status codes {#post-status-codes}
53+
54+
| Code | Description |
55+
|------|-------------|
56+
| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | The request is accepted and is being processed. The database state will be `active-change-pending` until the request has been fully processed. |
57+
| [404 Not Found](https://www.rfc-editor.org/rfc/rfc9110.html#name-404-not-found) | Attempting to perform an action on a nonexistent database. |
58+
| [409 Conflict](https://www.rfc-editor.org/rfc/rfc9110.html#name-409-conflict) | Attempting to change a database while it is busy with another configuration change. This is a temporary condition, and the request should be reattempted later. |
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
Title: Stop database traffic requests
3+
alwaysopen: false
4+
categories:
5+
- docs
6+
- operate
7+
- rs
8+
description: REST API requests to stop traffic for a database
9+
headerRange: '[1-2]'
10+
linkTitle: stop_traffic
11+
weight: $weight
12+
---
13+
14+
| Method | Path | Description |
15+
|--------|------|-------------|
16+
| [POST](#post-bdbs-actions-stop-traffic) | `/v1/bdbs/{uid}/actions/stop_traffic` | Stop database traffic |
17+
18+
## Stop database traffic {#post-bdbs-actions-stop-traffic}
19+
20+
```sh
21+
POST /v1/bdbs/{int: uid}/actions/stop_traffic
22+
```
23+
24+
Stop handling traffic for the database.
25+
26+
Use this action to stop read and write traffic on a database. To resume traffic afterward, use the [`resume_traffic`]({{<relref "/operate/rs/references/rest-api/requests/bdbs/actions/resume_traffic">}}) action.
27+
28+
#### Required permissions
29+
30+
| Permission name | Roles |
31+
|-----------------|-------|
32+
| [update_bdb_with_action]({{< relref "/operate/rs/references/rest-api/permissions#update_bdb_with_action" >}}) | admin<br />cluster_member<br />db_member |
33+
34+
### Request {#post-request}
35+
36+
#### Example HTTP request
37+
38+
```sh
39+
POST /bdbs/1/actions/stop_traffic
40+
```
41+
42+
#### URL parameters
43+
44+
| Field | Type | Description |
45+
|-------|------|-------------|
46+
| uid | integer | The unique ID of the database. |
47+
48+
### Response {#post-response}
49+
50+
Returns a JSON object with an `action_uid`. You can track the action's progress with a [`GET /v1/actions/<action_uid>`]({{<relref "/operate/rs/references/rest-api/requests/actions#get-action">}}) request.
51+
52+
#### Status codes {#post-status-codes}
53+
54+
| Code | Description |
55+
|------|-------------|
56+
| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | The request is accepted and is being processed. The database state will be `active-change-pending` until the request has been fully processed. |
57+
| [404 Not Found](https://www.rfc-editor.org/rfc/rfc9110.html#name-404-not-found) | Attempting to perform an action on a nonexistent database. |
58+
| [409 Conflict](https://www.rfc-editor.org/rfc/rfc9110.html#name-409-conflict) | Attempting to change a database while it is busy with another configuration change. This is a temporary condition, and the request should be reattempted later. |

0 commit comments

Comments
 (0)