This topic describes how to use the API to fuzzy query tenant system variables.
Request
Request syntax
GET /api/v1/tenant/:name/variables
Request parameters
| Parameter | Type | Required | Example value | Description |
|---|---|---|---|---|
| filter | string | No | max_connect% | The query parameter. This parameter is specified in the query parameter. |
Response
| Parameter | Type | Description |
|---|---|---|
| successful | bool | Indicates whether the request is successful. |
| timestamp | time.Time | The timestamp when the server received the request. |
| duration | int | The time (in milliseconds) required by the server to process the request. |
| status | int | The HTTP status code. |
| traceId | string | The Trace ID of the request. |
| data | []CdbObSysVariable | The list of system variables. For more information about the data structure of this parameter, see Data structure of CdbObSysVariable. |
| error | ApiError | The error information returned by the server, which includes the following fields:
|
CdbObSysVariable:
| Parameter | Type | Description |
|---|---|---|
| name | string | The name of the system variable. |
| value | string | The value of the system variable. |
| info | string | The information about the system variable. |
Examples
Request example
GET 10.10.10.1:2886/api/v1/tenant/t1/variables?filter=max_connect%
Response example
{
"successful": true,
"timestamp": "2024-10-14T15:14:01.277047628+08:00",
"duration": 36,
"status": 200,
"traceId": "e6f64ba7f54e7a47",
"data": {
"contents": [
{
"name": "max_connections",
"value": "1000",
"info": ""
}
]
}
}
References
You can also call API methods by using SDKs. For more information, see the following sections:
For information about how to call API methods by using obshell-sdk-python, see Fuzzy query tenant system variables in Query tenant system variables.
For information about how to call API methods by using obshell-sdk-go, see Fuzzy query tenant system variables in Query tenant system variables.