|
| 1 | +--- |
| 2 | +Title: Node master healthcheck requests |
| 3 | +alwaysopen: false |
| 4 | +categories: |
| 5 | +- docs |
| 6 | +- operate |
| 7 | +- rs |
| 8 | +description: REST API requests to check a node's connection to the cluster's primary node. |
| 9 | +headerRange: '[1-2]' |
| 10 | +hideListLinks: true |
| 11 | +linkTitle: node/master_healthcheck |
| 12 | +weight: $weight |
| 13 | +url: '/operate/rs/7.4/references/rest-api/requests/node_master_healthcheck/' |
| 14 | + |
| 15 | +--- |
| 16 | + |
| 17 | +| Method | Path | Description | |
| 18 | +|--------|------|-------------| |
| 19 | +| [GET](#get-node-master-healthcheck) | `/v1/local/node/master_healthcheck` | Checks a node's connection to the primary node | |
| 20 | + |
| 21 | +## Get master healthcheck {#get-node-master-healthcheck} |
| 22 | + |
| 23 | +```sh |
| 24 | +GET /v1/local/node/master_healthcheck |
| 25 | +``` |
| 26 | + |
| 27 | +Checks whether the current node has a valid connection to the cluster's primary node and the Cluster Configuration Store (CCS). |
| 28 | + |
| 29 | +### Required permissions |
| 30 | + |
| 31 | +| Permission name | Roles | |
| 32 | +|-----------------|-------| |
| 33 | +| [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 | |
| 34 | + |
| 35 | +### Request {#get-request} |
| 36 | + |
| 37 | +#### Example HTTP request |
| 38 | + |
| 39 | +```sh |
| 40 | +GET /v1/local/node/master_healthcheck |
| 41 | +``` |
| 42 | + |
| 43 | + |
| 44 | +#### Headers |
| 45 | + |
| 46 | +| Key | Value | Description | |
| 47 | +|-----|-------|-------------| |
| 48 | +| Host | cnm.cluster.fqdn | Domain name | |
| 49 | +| Accept | application/json | Accepted media type | |
| 50 | + |
| 51 | + |
| 52 | +### Response {#get-response} |
| 53 | + |
| 54 | +Returns a JSON object that includes the status of the current node's connection to the cluster's primary node and the CCS. |
| 55 | + |
| 56 | +- `active`: the current node has a valid connection. |
| 57 | + |
| 58 | +- `inactive`: the current node doesn't have a valid connection. |
| 59 | + |
| 60 | +#### Example JSON response body |
| 61 | + |
| 62 | +```json |
| 63 | +{ |
| 64 | + "status": "active" |
| 65 | +} |
| 66 | +``` |
| 67 | + |
| 68 | +#### Status codes {#get-status-codes} |
| 69 | + |
| 70 | +| Code | Description | |
| 71 | +|------|-------------| |
| 72 | +| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | No error | |
0 commit comments