This topic describes how to perform a fuzzy query for tenant parameters using the API.
API details
Authentication is required if a password is set. 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% | Query parameters. These parameters are specified using the query param parameter. |
Response parameters
Parameter |
Type |
Description |
|---|---|---|
| successful | bool | Whether the request was successful. |
| timestamp | time.Time | The timestamp when the server completed the request. |
| duration | int | The time taken by the server to process the request, in milliseconds. |
| status | int | An encoding that complies with the HTTP Status specification. |
| traceId | string | The trace ID of the request. |
| data | GvObParameter | The returned parameter information. For details, see Data structure of GvObParameter below. |
| error | ApiError | The error generated by the request contains the following information:
|
The data structure of GvObParameter:
Parameter |
Type |
Description |
|---|---|---|
| name | string | Parameter name. |
| value | string | The value of the parameter. |
| data_type | string | The data type of the parameter. |
| info | string | Parameter information. |
| 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
In addition to calling the API interface via the command line, you can also call it using SDK methods.
For information about requesting API methods using obshell-sdk-python, see Fuzzy query for tenant parameters in Query tenant parameters.
For information about requesting API methods using obshell-sdk-go, see Fuzzy query for tenant parameters in Query tenant parameters.
