|
| 1 | +--- |
| 2 | +Title: Diagnostics requests |
| 3 | +alwaysopen: false |
| 4 | +categories: |
| 5 | +- docs |
| 6 | +- operate |
| 7 | +- rs |
| 8 | +description: REST API requests for the diagnostic logging service. |
| 9 | +headerRange: '[1-2]' |
| 10 | +hideListLinks: true |
| 11 | +linkTitle: diagnostics |
| 12 | +weight: $weight |
| 13 | +--- |
| 14 | + |
| 15 | +| Method | Path | Description | |
| 16 | +|--------|------|-------------| |
| 17 | +| [GET](#get-diagnostics) | `/v1/diagnostics` | Get diagnostic logging service configuration | |
| 18 | +| [PUT](#put-diagnostics) | `/v1/diagnostics` | Update diagnostic logging service configuration | |
| 19 | + |
| 20 | +## Get diagnostic logging service configuration {#get-diagnostics} |
| 21 | + |
| 22 | +```sh |
| 23 | +GET /v1/diagnostics |
| 24 | +``` |
| 25 | + |
| 26 | +Gets the diagnostic logging service configuration as JSON. |
| 27 | + |
| 28 | +#### Required 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/diagnostics |
| 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 JSON object that represents the diagnostic logging service configuration. |
| 52 | + |
| 53 | +#### Example response body |
| 54 | + |
| 55 | +```json |
| 56 | +{ |
| 57 | + "slowlog_target":{"cron_expression": "", "max_entries":50}, |
| 58 | + "rladmin_status_target":{"cron_expression": "* * * * * *"} |
| 59 | +} |
| 60 | +``` |
| 61 | + |
| 62 | +#### Status codes {#get-status-codes} |
| 63 | + |
| 64 | +| Code | Description | |
| 65 | +|------|-------------| |
| 66 | +| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | No error | |
| 67 | + |
| 68 | +## Update diagnostic logging service configuration {#put-diagnostics} |
| 69 | + |
| 70 | +```sh |
| 71 | +PUT /v1/diagnostics |
| 72 | +``` |
| 73 | + |
| 74 | +Updates the diagnostic logging service configuration. |
| 75 | + |
| 76 | +#### Required permissions |
| 77 | + |
| 78 | +| Permission name | Roles | |
| 79 | +|-----------------|-------| |
| 80 | +| [update_cluster]({{< relref "/operate/rs/references/rest-api/permissions#update_cluster" >}}) | admin | |
| 81 | + |
| 82 | +### Request {#put-request} |
| 83 | + |
| 84 | +#### Example HTTP request |
| 85 | + |
| 86 | +```sh |
| 87 | +PUT /v1/diagnostics |
| 88 | +``` |
| 89 | + |
| 90 | +#### Example JSON body |
| 91 | + |
| 92 | +```json |
| 93 | +{ |
| 94 | + "rladmin_status_target": { |
| 95 | + "cron_expression": "5 * * * *" |
| 96 | + } |
| 97 | +} |
| 98 | +``` |
| 99 | + |
| 100 | +#### Headers |
| 101 | + |
| 102 | +| Key | Value | Description | |
| 103 | +|-----|-------|-------------| |
| 104 | +| Host | cnm.cluster.fqdn | Domain name | |
| 105 | +| Accept | application/json | Accepted media type | |
| 106 | + |
| 107 | +### Response {#put-response} |
| 108 | + |
| 109 | +Returns a JSON object that represents the updated diagnostic logging service configuration. |
| 110 | + |
| 111 | +#### Example response body |
| 112 | + |
| 113 | +```json |
| 114 | +{ |
| 115 | + "rladmin_status_target": { |
| 116 | + "cron_expression": "5 * * * *" |
| 117 | + }, |
| 118 | + "slowlog_target": { |
| 119 | + "cron_expression": "" |
| 120 | + } |
| 121 | +} |
| 122 | +``` |
| 123 | + |
| 124 | +#### Status codes {#put-status-codes} |
| 125 | + |
| 126 | +| Code | Description | |
| 127 | +|------|-------------| |
| 128 | +| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | No error. | |
| 129 | +| [400 Bad Request](https://www.rfc-editor.org/rfc/rfc9110.html#name-400-bad-request) | Bad content provided. | |
| 130 | +| [409 Conflict](https://www.rfc-editor.org/rfc/rfc9110.html#name-409-conflict) | Attempting to configure the diagnostic logging service target 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