Get Node Pairs
Retrieves a list of node pairs matching the search criteria.
Required Permissions
Requires the ADMIN role or higher.
HTTP Request
GET /api/sonar/node-pairs
cURL Example
curl -H "Authorization: Bearer <API_KEY>" \
-G \
--data-urlencode "include_nodes=true" \
https://HOSTNAME/api/sonar/node-pairs
Request Parameters
| Key | Required | Type | Description | Notes |
|---|---|---|---|---|
| include_nodes | No | Boolean | Whether to include node details | Default: false |
| offset | No | 32-bit integer | Number of records to skip | Default: 0 |
| limit | No | 32-bit integer | Maximum number of records to load | Default: 2147483647 |
| keywords | No | String | Search keyword | Searches node pair name and description |
Success Response
{
"node_pairs": [
{
"guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"type": "control",
"name": "primary-control",
"description": "Primary control node pair",
"is_local": true,
"is_alive": true,
"vip_host": "203.0.113.10",
"vip_port": 8443,
"guid1": "b2c3d4e5-f678-9012-bcde-f12345678901",
"nid": "control-a",
"host": "192.0.2.10",
"port": 8443,
"user": "admin",
"secure": true,
"check_cert": true,
"connect_timeout": 10000,
"read_timeout": 10000,
"guid2": "c3d4e5f6-7890-1234-cdef-123456789012",
"nid2": "control-b",
"host2": "192.0.2.11",
"port2": 8443,
"user2": "admin",
"secure2": true,
"check_cert2": true,
"connect_timeout2": 10000,
"read_timeout2": 10000
}
]
}
- node_pairs (Array): Node pair list
- guid (String): Node pair GUID (36 characters)
- type (String): Node type (
control,data) - name (String): Node pair name
- description (String): Node pair description
- is_local (Boolean): Whether the pair is local
- is_alive (Boolean): Node pair status (
true: alive,false: disconnected) - vip_host (String): Virtual IP address
- vip_port (32-bit integer): Virtual IP web port
- guid1 (String): GUID of node A (returned only when
include_nodes=true) - nid (String): Node A identifier
- host (String): Node A host address
- port (32-bit integer): Node A web port
- user (String): Node A login account
- secure (Boolean): Whether node A uses HTTPS
- check_cert (Boolean): Whether node A verifies the server certificate
- connect_timeout (32-bit integer): Node A connect timeout in milliseconds
- read_timeout (32-bit integer): Node A read timeout in milliseconds
- guid2 (String): GUID of node B (returned only when a standby node is registered)
- nid2 (String): Node B identifier
- host2 (String): Node B host address
- port2 (32-bit integer): Node B web port
- user2 (String): Node B login account
- secure2 (Boolean): Whether node B uses HTTPS
- check_cert2 (Boolean): Whether node B verifies the server certificate
- connect_timeout2 (32-bit integer): Node B connect timeout in milliseconds
- read_timeout2 (32-bit integer): Node B read timeout in milliseconds
Error Responses
offset or limit value is not an integer
HTTP status code 400
{
"error_code": "invalid-argument",
"error_msg": "'offset' parameter should be int type"
}
Permission denied
HTTP status code 500
{
"error_code": "illegal-state",
"error_msg": "no-permission"
}