This topic describes how to modify the log archiving status of a cluster through the API.
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. |
Response parameters
| Parameter | Type | Description |
|---|---|---|
| successful | bool | Indicates whether the request is successful. |
| timestamp | time.Time | The timestamp when the server completes 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, which contains the following fields:
|
Examples
Request example
PATCH 10.10.10.1:2886/api/v1/obcluster/backup/log
{
"status": "stop",
}
Response example
{
"successful": true,
"timestamp": "2024-01-09T17:11:43.385889278+08:00",
"duration": 1,
"status": 200,
"traceId": "877fe32b83634153",
}
References
You can also call the API through SDK methods.
For more information about how to call the API through the obshell-sdk-python, see Modify the log archiving status of a cluster.
For more information about how to call the API through the obshell-sdk-go, see Modify the log archiving status of a cluster.