|
| 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 | +url: '/operate/rs/7.8/references/rest-api/requests/job_scheduler/' |
| 14 | +--- |
| 15 | + |
| 16 | +| Method | Path | Description | |
| 17 | +|--------|------|-------------| |
| 18 | +| [GET](#get-job-scheduler) | `/v1/job_scheduler` | Get job scheduler settings | |
| 19 | +| [PUT](#put-job-scheduler) | `/v1/job_scheduler` | Update job scheduler settings | |
| 20 | + |
| 21 | +## Get job scheduler settings {#get-job-scheduler} |
| 22 | + |
| 23 | +```sh |
| 24 | +GET /v1/job_scheduler |
| 25 | +``` |
| 26 | + |
| 27 | +Get job scheduler information. |
| 28 | + |
| 29 | +### Permissions |
| 30 | + |
| 31 | +| Permission name | Roles | |
| 32 | +|-----------------|-------| |
| 33 | +| [view_cluster_info]({{< relref "/operate/rs/7.8/references/rest-api/permissions#view_cluster_info" >}}) | admin<br />cluster_member<br />cluster_viewer<br />db_member<br />db_viewer<br />user_manager | |
| 34 | + |
| 35 | +### Request {#get-request} |
| 36 | + |
| 37 | +#### Example HTTP request |
| 38 | + |
| 39 | +```sh |
| 40 | +GET /v1/job_scheduler |
| 41 | +``` |
| 42 | + |
| 43 | +#### Headers |
| 44 | + |
| 45 | +| Key | Value | Description | |
| 46 | +|-----|-------|-------------| |
| 47 | +| Host | cnm.cluster.fqdn | Domain name | |
| 48 | +| Accept | application/json | Accepted media type | |
| 49 | + |
| 50 | +### Response {#get-response} |
| 51 | + |
| 52 | +Returns a [job_scheduler object]({{<relref "/operate/rs/7.8/references/rest-api/objects/job_scheduler">}}). |
| 53 | + |
| 54 | +#### Example JSON body |
| 55 | + |
| 56 | +```json |
| 57 | +{ |
| 58 | + "backup_job_settings": { |
| 59 | + "cron_expression": "*/5 * * * *", |
| 60 | + "enabled": true |
| 61 | + }, |
| 62 | + "bdb_usage_report_job_settings": { |
| 63 | + "cron_expression": "0 */1 * * *", |
| 64 | + "enabled": false, |
| 65 | + "file_retention_days": 365 |
| 66 | + }, |
| 67 | + "cert_rotation_job_settings": { |
| 68 | + "cron_expression": "0 * * * *", |
| 69 | + "enabled": true, |
| 70 | + "expiry_days_before_rotation": 60 |
| 71 | + }, |
| 72 | + "log_rotation_job_settings": { |
| 73 | + "cron_expression": "*/5 * * * *", |
| 74 | + "enabled": true |
| 75 | + }, |
| 76 | + "node_checks_job_settings": { |
| 77 | + "cron_expression": "0 * * * *", |
| 78 | + "enabled": true |
| 79 | + }, |
| 80 | + "redis_cleanup_job_settings": { |
| 81 | + "cron_expression": "0 * * * *" |
| 82 | + }, |
| 83 | + "rotate_ccs_job_settings": { |
| 84 | + "cron_expression": "*/5 * * * *", |
| 85 | + "enabled": true, |
| 86 | + "file_suffix": "5min", |
| 87 | + "rotate_max_num": 24 |
| 88 | + } |
| 89 | +} |
| 90 | +``` |
| 91 | + |
| 92 | +#### Status codes {#get-status-codes} |
| 93 | + |
| 94 | +| Code | Description | |
| 95 | +|------|-------------| |
| 96 | +| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | No error. | |
| 97 | + |
| 98 | +## Update job scheduler settings {#put-job-scheduler} |
| 99 | + |
| 100 | +```sh |
| 101 | +PUT /v1/job_scheduler |
| 102 | +``` |
| 103 | + |
| 104 | +Update job scheduler settings. |
| 105 | + |
| 106 | +### Permissions |
| 107 | + |
| 108 | +| Permission name | Roles | |
| 109 | +|-----------------|-------| |
| 110 | +| [update_cluster]({{< relref "/operate/rs/7.8/references/rest-api/permissions#update_cluster" >}}) | admin | |
| 111 | + |
| 112 | +### Request {#put-request} |
| 113 | + |
| 114 | +#### Example HTTP request |
| 115 | + |
| 116 | +```sh |
| 117 | +PUT /v1/job_scheduler |
| 118 | +``` |
| 119 | + |
| 120 | +#### Example JSON body |
| 121 | + |
| 122 | +```json |
| 123 | +{ |
| 124 | + "backup_job_settings": { |
| 125 | + "cron_expression": "*/10 * * * *" |
| 126 | + } |
| 127 | +} |
| 128 | +``` |
| 129 | + |
| 130 | +#### Headers |
| 131 | + |
| 132 | +| Key | Value | Description | |
| 133 | +|-----|-------|-------------| |
| 134 | +| Host | cnm.cluster.fqdn | Domain name | |
| 135 | +| Accept | application/json | Accepted media type | |
| 136 | + |
| 137 | + |
| 138 | +#### Body |
| 139 | + |
| 140 | +Include a [job_scheduler object]({{<relref "/operate/rs/7.8/references/rest-api/objects/job_scheduler">}}) with updated fields in the request body. |
| 141 | + |
| 142 | +### Response {#put-response} |
| 143 | + |
| 144 | +Returns a [job_scheduler object]({{<relref "/operate/rs/7.8/references/rest-api/objects/job_scheduler">}}) with the updated fields. |
| 145 | + |
| 146 | +#### Example JSON body |
| 147 | + |
| 148 | +```json |
| 149 | +{ |
| 150 | + "backup_job_settings": { |
| 151 | + "cron_expression": "*/10 * * * *", |
| 152 | + "enabled": true |
| 153 | + }, |
| 154 | + "bdb_usage_report_job_settings": { |
| 155 | + "cron_expression": "0 */1 * * *", |
| 156 | + "enabled": false, |
| 157 | + "file_retention_days": 365 |
| 158 | + }, |
| 159 | + "cert_rotation_job_settings": { |
| 160 | + "cron_expression": "0 * * * *", |
| 161 | + "enabled": true, |
| 162 | + "expiry_days_before_rotation": 60 |
| 163 | + }, |
| 164 | + "log_rotation_job_settings": { |
| 165 | + "cron_expression": "*/5 * * * *", |
| 166 | + "enabled": true |
| 167 | + }, |
| 168 | + "node_checks_job_settings": { |
| 169 | + "cron_expression": "0 * * * *", |
| 170 | + "enabled": true |
| 171 | + }, |
| 172 | + "rotate_ccs_job_settings": { |
| 173 | + "cron_expression": "*/5 * * * *", |
| 174 | + "enabled": true, |
| 175 | + "file_suffix": "5min", |
| 176 | + "rotate_max_num": 24 |
| 177 | + } |
| 178 | +} |
| 179 | +``` |
| 180 | + |
| 181 | +#### Status codes {#put-status-codes} |
| 182 | + |
| 183 | +| Code | Description | |
| 184 | +|------|-------------| |
| 185 | +| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | No error. | |
| 186 | +| [400 Bad Request](https://www.rfc-editor.org/rfc/rfc9110.html#name-400-bad-request) | Bad content provided. | |
| 187 | +| [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