# Admin: Get Cluster State
## Endpoint
`/api/admin/cluster/state`
## Method
GET
## Description
Returns data on the current state of the Cluster.
## Authentication
Required. Token must be provided via the `token` parameter.
## Permissions
Administration: View
## Parameters
| `token` | string | Yes | No | The session token generated by the `login` or the `createToken` call. |
| `node` | string | No | No | The node domain name for which the API call is intended. When unspecified, the current node is used. Can only be used when Clustering is initialized. |
| `includeServerIpAddresses` | boolean | No | No | Set to `true` to return a list of static IP addresses configured on the server. Default is `false`. |
## Response Fields
| `clusterInitialized` | boolean | Whether clustering has been initialized on this server. |
| `dnsServerDomain` | string | The FQDN of the DNS server. |
| `version` | string | The DNS server software version. |
| `clusterDomain` | string | The domain name identifying the cluster (only present when `clusterInitialized` is `true`). |
| `heartbeatRefreshIntervalSeconds` | integer | Interval in seconds for refreshing node state (only present when `clusterInitialized` is `true`). |
| `heartbeatRetryIntervalSeconds` | integer | Retry interval in seconds for state refresh on failure (only present when `clusterInitialized` is `true`). |
| `configRefreshIntervalSeconds` | integer | Interval in seconds for refreshing configuration from the Primary node (only present when `clusterInitialized` is `true`). |
| `configRetryIntervalSeconds` | integer | Retry interval in seconds for configuration refresh on failure (only present when `clusterInitialized` is `true`). |
| `configLastSynced` | string (datetime) | ISO 8601 timestamp of the last successful configuration sync (only present when `clusterInitialized` is `true`). |
| `nodes` | array | List of cluster node objects (only present when `clusterInitialized` is `true`). |
| `nodes[].id` | integer | Unique numeric identifier for the node. |
| `nodes[].name` | string | The FQDN of the node. |
| `nodes[].url` | string | The HTTPS API web service URL of the node. |
| `nodes[].ipAddress` | string | The IP address of the node. |
| `nodes[].type` | string | The node type. Known values: `Primary`, `Secondary`. |
| `nodes[].state` | string | The node state. Known values: `Self`, `Connected`, `Unreachable`. |
| `nodes[].lastSeen` | string (datetime) | ISO 8601 timestamp of when the node was last seen. `0001-01-01T00:00:00` for nodes that have never been contacted or for the `Self` node. |
| `serverIpAddresses` | array of strings | List of static IP addresses configured on the server (only present when `includeServerIpAddresses=true`). |
## Conditional Logic Notes
- When `clusterInitialized` is `false`, the response only contains `clusterInitialized`, `dnsServerDomain`, and `version`. All cluster-specific fields are absent.
- The `serverIpAddresses` field is only present when `includeServerIpAddresses` is set to `true`.
- The `node` parameter is only functional when Clustering is initialized.
- The node with `state: "Self"` represents the server responding to the request.
## Edge Cases
- Nodes with `state: "Unreachable"` have a `lastSeen` timestamp of `0001-01-01T00:00:00` if they were never successfully contacted.
- The `Self` node always has `lastSeen` of `0001-01-01T00:00:00` since it does not need to be contacted externally.
- When clustering is not initialized, the `dnsServerDomain` may be a short hostname rather than an FQDN.
- There is exactly one `Primary` node and zero or more `Secondary` nodes in any cluster.