Skip to content

Commit a2f0601

Browse files
committed
DOC-5034 Added job_scheduler REST API reference
1 parent cb28573 commit a2f0601

File tree

1 file changed

+161
-0
lines changed
  • content/operate/rs/references/rest-api/requests/job_scheduler

1 file changed

+161
-0
lines changed
Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
---
2+
Title: Job scheduler requests
3+
alwaysopen: false
4+
categories:
5+
- docs
6+
- operate
7+
- rs
8+
description: REST API requests for the job scheduler
9+
headerRange: '[1-2]'
10+
hideListLinks: true
11+
linkTitle: job_scheduler
12+
weight: $weight
13+
---
14+
15+
| Method | Path | Description |
16+
|--------|------|-------------|
17+
| [GET](#get-job-scheduler) | `/v1/job_scheduler` | Get job scheduler settings |
18+
| [PUT](#put-job-scheduler) | `/v1/job_scheduler` | Update job scheduler settings |
19+
20+
## Get job scheduler settings {#get-job-scheduler}
21+
22+
```sh
23+
GET /v1/job_scheduler
24+
```
25+
26+
Get job scheduler information.
27+
28+
### Permissions
29+
30+
| Permission name | Roles |
31+
|-----------------|-------|
32+
| [view_cluster_info]({{< relref "/operate/rs/references/rest-api/permissions#view_cluster_info" >}}) | admin<br />cluster_member<br />cluster_viewer<br />db_member<br />db_viewer<br />user_manager |
33+
34+
### Request {#get-request}
35+
36+
#### Example HTTP request
37+
38+
```sh
39+
GET /v1/job_scheduler
40+
```
41+
42+
#### Headers
43+
44+
| Key | Value | Description |
45+
|-----|-------|-------------|
46+
| Host | cnm.cluster.fqdn | Domain name |
47+
| Accept | application/json | Accepted media type |
48+
49+
### Response {#get-response}
50+
51+
Returns a [job_scheduler object]({{<relref "/operate/rs/references/rest-api/objects/job_scheduler">}}).
52+
53+
#### Example JSON body
54+
55+
```json
56+
{
57+
"backup_job_settings": {
58+
"cron_expression": "0 * * * *",
59+
"enabled": true
60+
},
61+
"redis_cleanup_job_settings": {
62+
"cron_expression": "0 * * * *",
63+
"enabled": true
64+
},
65+
"rotate_ccs_job_settings": {
66+
"cron_expression": "*/5 * * * *",
67+
"file_suffix": "5min",
68+
"rotate_max_num": 24,
69+
"enabled": true
70+
},
71+
"node_checks_job_settings": {
72+
"cron_expression": "*/5 * * * *",
73+
"enabled": false
74+
}
75+
}
76+
```
77+
78+
#### Status codes {#get-status-codes}
79+
80+
| Code | Description |
81+
|------|-------------|
82+
| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | No error. |
83+
84+
## Update job scheduler settings {#put-job-scheduler}
85+
86+
```sh
87+
PUT /v1/job_scheduler
88+
```
89+
90+
Update job scheduler settings.
91+
92+
### Permissions
93+
94+
| Permission name | Roles |
95+
|-----------------|-------|
96+
| [update_cluster]({{< relref "/operate/rs/references/rest-api/permissions#update_cluster" >}}) | admin |
97+
98+
### Request {#put-request}
99+
100+
#### Example HTTP request
101+
102+
```sh
103+
PUT /v1/job_scheduler
104+
```
105+
106+
#### Example JSON body
107+
108+
```json
109+
{
110+
"backup_job_settings": {
111+
"cron_expression": "5 * * * *"
112+
}
113+
}
114+
```
115+
116+
#### Headers
117+
118+
| Key | Value | Description |
119+
|-----|-------|-------------|
120+
| Host | cnm.cluster.fqdn | Domain name |
121+
| Accept | application/json | Accepted media type |
122+
123+
124+
#### Body
125+
126+
Include a [job_scheduler object]({{<relref "/operate/rs/references/rest-api/objects/job_scheduler">}}) with updated fields in the request body.
127+
128+
### Response {#put-response}
129+
130+
Returns a [job_scheduler object]({{<relref "/operate/rs/references/rest-api/objects/job_scheduler">}}) with the updated fields.
131+
132+
#### Example JSON body
133+
134+
```json
135+
{
136+
"backup_job_settings": {
137+
"cron_expression": "5 * * * *",
138+
"enabled": false,
139+
},
140+
"redis_cleanup_job_settings": {
141+
"cron_expression": "0 * * * *"
142+
},
143+
"rotate_ccs_job_settings": {
144+
"cron_expression": "*/5 * * * *",
145+
"file_suffix": "5min",
146+
"rotate_max_num": 24
147+
},
148+
"node_checks_job_settings": {
149+
"cron_expression": "*/5 * * * *",
150+
"enabled": true,
151+
}
152+
}
153+
```
154+
155+
#### Status codes {#put-status-codes}
156+
157+
| Code | Description |
158+
|------|-------------|
159+
| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | No error. |
160+
| [400 Bad Request](https://www.rfc-editor.org/rfc/rfc9110.html#name-400-bad-request) | Bad content provided. |
161+
| [409 Conflict](https://www.rfc-editor.org/rfc/rfc9110.html#name-409-conflict) | Attempting to configure the job_scheduler while it is busy with another configuration change. In this context, this is a temporary condition and the request should be re-attempted later. |

0 commit comments

Comments
 (0)