This topic describes how to modify the log archiving status of a tenant by using the API.
Request
Request syntax
PATCH /api/v1/tenant/:name/backup/log
Request parameters
Parameter |
Type |
Required |
Example |
Description |
|---|---|---|---|---|
| status | string | No | "stop" | The log archiving status. Valid values include stop and doing. The default value is stop. |
Request example
PATCH 10.10.10.1:2886/api/v1/tenant/t1/backup/log
{
"status": "stop",
}
Response
Parameter |
Type |
Description |
|---|---|---|
| successful | bool | Indicates whether the request was successful. |
| timestamp | time.Time | The timestamp when the server completed 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. |
| error | ApiError | The error information returned by the server, which contains the following fields:
|
Examples
Request example
PATCH 10.10.10.1:2886/api/v1/tenant/t1/backup/log
code-placeholder/dc8ab5ac-63b3-4a31-8029-31802548605c
Response example
{
"successful": true,
"timestamp": "2024-01-09T17:11:43.385889278+08:00",
"duration": 1,
"status": 200,
"traceId": "877fe32b83634153",
}
References
You can also call API methods through SDKs.
For more information about how to call the API method through obshell-sdk-python, see Modify the log archiving status of a tenant.
For more information about how to call the API method through obshell-sdk-go, see Modify the log archiving status of a tenant.
