This topic describes how to query a system variable of a specified tenant through an API.
Request parameters
The following table describes the request parameters.
| Parameter | Type | Description |
|---|---|---|
| name | string | The name of the tenant. |
| variable | string | The name of the system variable. |
Response parameters
| 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 ms) taken by the server to process the request. |
| status | int | The HTTP status code. |
| traceId | string | The Trace ID of the request. |
| data | CdbObSysVariable | The system variable information. For more information, see the Data structure of CdbObSysVariable section. |
| error | ApiError | The error information returned by the request. It contains the following fields:
|
The data structure of 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/variable/max_connections
Response example
{
"successful": true,
"timestamp": "2024-10-14T15:16:28.044579876+08:00",
"duration": 20,
"status": 200,
"traceId": "3702684711dd0e7b",
"data": {
"name": "max_connections",
"value": "1000",
"info": ""
}
}
References
You can also call the API through SDK methods.
For more information about how to query a system variable of a specified tenant through obshell-sdk-python, see Query a specified tenant's system variable in Query a tenant's system variable.
For more information about how to query a system variable of a specified tenant through obshell-sdk-go, see Query a specified tenant's system variable in Query a tenant's system variable.