# Admin: Update Primary Node
## Endpoint
`/api/admin/cluster/secondary/updatePrimary`
## Method
GET
## Description
Allows updating the Primary node details (API URL and IP addresses) on the Secondary node. Useful when the Primary node's IP address or URL has changed while the Secondary node was offline, causing it to have stale details. This call can only be made at the Secondary node.
## Authentication
Required. Token must be provided via the `token` parameter.
## Permissions
Administration: Modify
## 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. |
| `primaryNodeUrl` | string | Yes | No | The web service HTTPS URL of the Primary node in the Cluster. |
| `primaryNodeIpAddresses` | string | No | No | The IP addresses of the Primary node. When unspecified, the domain name in the Primary node URL will be resolved and used. |
## Response Fields
| `clusterInitialized` | boolean | `true` indicating the cluster is active. |
| `dnsServerDomain` | string | The FQDN of this DNS server. |
| `version` | string | The DNS server software version. |
| `clusterDomain` | string | The cluster domain name. |
| `heartbeatRefreshIntervalSeconds` | integer | Heartbeat refresh interval. |
| `heartbeatRetryIntervalSeconds` | integer | Heartbeat retry interval. |
| `configRefreshIntervalSeconds` | integer | Config refresh interval. |
| `configRetryIntervalSeconds` | integer | Config retry interval. |
| `configLastSynced` | string (datetime) | Timestamp of last config sync. |
| `nodes` | array | List of all cluster node objects with updated Primary details. |
| `nodes[].id` | integer | Unique node ID. |
| `nodes[].name` | string | Node FQDN. |
| `nodes[].url` | string | Node HTTPS API URL. |
| `nodes[].ipAddresses` | array of strings | Node IP addresses. |
| `nodes[].type` | string | Node type: `Primary` or `Secondary`. |
| `nodes[].state` | string | Node state: `Self`, `Connected`, or `Unreachable`. |
| `nodes[].lastSeen` | string (datetime) | Timestamp of last contact. |
## Conditional Logic Notes
- This call can only be made at a Secondary node.
- The `primaryNodeIpAddresses` is optional; when omitted, DNS resolution of the URL hostname is used.
- This is a manual override for situations where the Secondary has stale Primary node details.
## Edge Cases
- If the new Primary node URL or IP addresses are incorrect, the Secondary will be unable to communicate with the Primary.
- This does not verify connectivity to the Primary; it simply updates the stored details.
- Useful recovery mechanism when the Secondary was offline during a Primary node IP/URL change.