This topic describes how to modify the status of cluster-level backups by using the API.
Request parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| status | string | No | "canceled" | The backup status. Valid values include canceled. The default value is canceled. |
Request
PATCH /api/v1/obcluster/backup
Response
| Parameter | Type | Description |
|---|---|---|
| successful | bool | Indicates whether the request is successful. |
| timestamp | time.Time | The timestamp when the request is completed on the server. |
| 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. |
| error | ApiError | The error generated during the request, which contains the following information:
|
Examples
Request example
PATCH 10.10.10.1:2886/api/v1/obcluster/backup
{
"status": "canceled",
}
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 by using the SDK.
For more information about how to call the API by using obshell-sdk-python, see Modify the status of cluster-level backups.
For more information about how to call the API by using obshell-sdk-go, see Modify the status of cluster-level backups.