Proxy requests
| Method | Path | Description |
|---|---|---|
| GET | /v1/proxies | Get all proxies |
| GET | /v1/proxies/{uid} | Get a proxy |
| PUT | /v1/proxies/{uid} | Update a proxy |
| PUT | /v1/proxies | Update all proxies |
Get all proxies
GET /v1/proxies
Get all the proxies in the cluster.
Permissions
| Permission name | Roles |
|---|---|
| view_all_proxies_info | admin cluster_member cluster_viewer db_member db_viewer |
Request
Example HTTP request
GET /proxies
Headers
| Key | Value | Description |
|---|---|---|
| Host | cnm.cluster.fqdn | Domain name |
| Accept | application/json | Accepted media type |
Response
Returns a JSON array of proxy objects.
Example JSON body
[
{
"uid": 1,
"client_keepintvl": 30,
"max_worker_server_conns": 16384,
"client_keepcnt": 6,
"max_threads": 64,
"ignore_bdb_cconn_output_buff_limits": false,
"dynamic_threads_scaling": false,
"max_worker_client_conns": 16384,
"max_servers": 4096,
"client_keepidle": 180,
"duration_usage_threshold": 30,
"max_worker_txns": 65536,
"threads": 3,
"max_listeners": 1024,
"conns": 500000,
"ignore_bdb_cconn_limit": false,
"threads_usage_threshold": 80,
"backlog": 1024
},
{
"uid": 2,
"threads": 3,
// additional fields...
}
]
Status codes
| Code | Description |
|---|---|
| 200 OK | No error |
Get proxy
GET /v1/proxies/{int: uid}
Get a single proxy’s info.
Permissions
| Permission name | Roles |
|---|---|
| view_proxy_info | admin cluster_member cluster_viewer db_member db_viewer |
Request
Example HTTP request
GET /proxies/1
Headers
| Key | Value | Description |
|---|---|---|
| Host | cnm.cluster.fqdn | Domain name |
| Accept | application/json | Accepted media type |
URL parameters
| Field | Type | Description |
|---|---|---|
| uid | integer | The proxy’s unique node ID |
Response
Returns a proxy object.
Example JSON body
{
"uid": 1,
"client_keepintvl": 30,
"max_worker_server_conns": 16384,
"client_keepcnt": 6,
"max_threads": 64,
"ignore_bdb_cconn_output_buff_limits": false,
"dynamic_threads_scaling": false,
"max_worker_client_conns": 16384,
"max_servers": 4096,
"client_keepidle": 180,
"duration_usage_threshold": 30,
"max_worker_txns": 65536,
"threads": 3,
"max_listeners": 1024,
"conns": 500000,
"ignore_bdb_cconn_limit": false,
"threads_usage_threshold": 80,
"backlog": 1024
}
Status codes
| Code | Description |
|---|---|
| 200 OK | No error |
| 404 Not Found | Proxy UID does not exist |
Update proxy
PUT /v1/proxies/{int: uid}
Updates a proxy object, notifies the proxy, and waits for acknowledgment (ACK) unless the node is dead.
Automatically restarts the proxy service if allow_restart is true and any updated parameters require a restart for the changes to take effect. For example, a restart is required if you change threads to a lower number.
However, if allow_restart is false, such changes only take effect after the next proxy restart.
Permissions
| Permission name | Roles |
|---|---|
| update_proxy | admin |
Request
Example HTTP request
PUT /proxies/1
Example JSON body
{
"allow_restart": true,
"proxy": {
"threads": 8
}
}
Headers
| Key | Value | Description |
|---|---|---|
| Host | cnm.cluster.fqdn | Domain name |
| Accept | application/json | Accepted media type |
| Content-Type | application/json | Request body media type |
URL parameters
| Field | Type | Description |
|---|---|---|
| uid | integer | The unique ID of the updated proxy. Corresponds to the node ID. |
Request body
Include a JSON object in the request body. The JSON object can contain the boolean field allow_restart and a proxy object with updated fields.
Response
Returns a status code to indicate the success or failure of the proxy update.
Status codes
| Code | Description |
|---|---|
| 200 OK | No error, the request has been processed |
| 400 Bad Request | Bad content provided |
| 404 Not Found | Proxy does not exist |
| 500 Internal Server Error | Error while waiting for confirmation from proxy |
| 504 Gateway Timeout | Timeout while waiting for confirmation from proxy |
Update all proxies
PUT /v1/proxies
Updates all the proxy objects, notifies the proxies, and waits for acknowledgment (ACK) unless the node is dead.
Automatically restarts the relevant proxy services if allow_restart is true and any updated parameters require a restart for the changes to take effect.
However, if allow_restart is false, such changes only take effect after the next proxy restart.
Permissions
| Permission name | Roles |
|---|---|
| update_proxy | admin |
Request
Example HTTP request
PUT /proxies
Example JSON body
{
"allow_restart": true,
"proxy": {
"threads": 8,
"max_threads": 12
}
}
Headers
| Key | Value | Description |
|---|---|---|
| Host | cnm.cluster.fqdn | Domain name |
| Accept | application/json | Accepted media type |
| Content-Type | application/json | Request body media type |
Request body
Include a JSON object in the request body. The JSON object can contain the boolean field allow_restart and a proxy object with updated fields.
Response
Returns a status code to indicate the success or failure of the proxy updates.
Status codes
| Code | Description |
|---|---|
| 200 OK | No error, the request has been processed |
| 400 Bad Request | Bad content provided |
| 500 Internal Server Error | Error while waiting for confirmation from proxy |
| 504 Gateway Timeout | Timeout while waiting for confirmation from proxy |