This topic describes how to query a tenant parameter by using the API.
Request
URI
GET /api/v1/tenant/:name/parameter/: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) 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 tenant parameter information. For more information, see Data structure of GvObParameter. |
| error | ApiError | The error information generated during the request. It 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 | Information about the parameter. |
| edit_level | string | The modification level of the parameter. |
Examples
Request example
GET 10.10.10.1:2886/api/v1/tenant/t1/parameter/max_partition_num
Response example
{
"successful": true,
"timestamp": "2024-10-14T15:19:46.214458368+08:00",
"duration": 25,
"status": 200,
"traceId": "7fed9977fe59a58f",
"data": {
"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 the API by using the SDK.
For more information about how to call the API by using obshell-sdk-python, see Query a specified tenant parameter in Query tenant parameters.
For more information about how to call the API by using obshell-sdk-go, see Query a specified tenant parameter in Query tenant parameters.