This topic describes how to use the API to fuzzily query tenant parameters.
Call procedure
If a password is set, you must authenticate. For more information, see API hybrid encryption.
Request path
GET /api/v1/tenant/:name/parameters
Request parameters
| Parameter | Type | Required | Example value | Description |
|---|---|---|---|---|
| filter | string | No | max_partition% | The filter condition. This parameter is specified in the query param. |
Response parameters
| Parameter | Type | Description |
|---|---|---|
| successful | bool | Whether the request is successful. |
| timestamp | time.Time | The timestamp when the server received the request. |
| duration | int | The time (in milliseconds) taken by the server to process the request. |
| status | int | The HTTP status code. |
| traceId | string | The Trace ID of the request. |
| data | GvObParameter | The returned parameter information. For more information, see the Data structure of GvObParameter section. |
| error | ApiError | The error information generated during the request, which contains the following fields:
|
The data structure of GvObParameter:
| Parameter | Type | Description |
|---|---|---|
| name | string | The name of the parameter. |
| value | string | The value of the parameter. |
| data_type | string | The data type of the parameter. |
| info | string | The information of the parameter. |
| edit_level | string | The modification level of the parameter. |
Examples
Request example
GET 10.10.10.1:2886/api/v1/tenant/t1/parameters?filter=max_partition%
Response example
{
"successful": true,
"timestamp": "2024-10-14T15:00:19.769142288+08:00",
"duration": 22,
"status": 200,
"traceId": "e0bad793ea31b95a",
"data": {
"contents": [
{
"name": "max_partition_num",
"value": "8192",
"data_type": "",
"info": "set max partition num in mysql mode",
"edit_level": "DYNAMIC_EFFECTIVE"
}
]
}
}
References
You can also call API methods by using SDKs.
For more information about how to call API methods by using obshell-sdk-python, see Fuzzy query tenant parameters in Query tenant parameters.
For more information about how to call API methods by using obshell-sdk-go, see Fuzzy query tenant parameters in Query tenant parameters.