This topic describes how to set parameters for a specified tenant by using APIs. You can set multiple parameters for a specified tenant at once.
API details
Authentication is required if a password is set. For more information, see API hybrid encryption.
Request path
PUT /api/v1/tenant/:name/parameters
Request parameters
Parameter |
Type |
Required |
Example value |
Description |
|---|---|---|---|---|
| parameters | map[string]interface{} | Yes | { "backup_data_file_size": "2G", "arbitration_timeout": "10s" } |
Specify the tenant's parameters. |
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. |
| error | ApiError | The error generated by the request contains the following information:
|
Examples
Request example
PUT 10.10.10.1:2886/api/v1/tenant/t1/parameters
{
"parameters": {
"backup_data_file_size": "2G",
"arbitration_timeout": "10s"
}
}
Response example
{
"successful": true,
"timestamp": "2024-10-14T11:27:13.084193081+08:00",
"duration": 67,
"status": 200,
"traceId": "5932e4b9b304ad3d"
}
References
You can call the API interface not only through the command line but also by using SDK methods.
For information about how to call the API method using obshell-sdk-python, see Modify tenant parameters.
For information about how to call the API method using obshell-sdk-go, see Modify tenant parameters.
