删除个人镜像
删除用户指定的个人镜像。删除操作不可逆,请谨慎操作。删除后镜像数据将无法恢复。
请求参数
要删除的镜像uuid
响应参数
响应码
响应信息
curl --request POST \
--url https://www.chenyu.cn/api/open/v2/image/private/delete \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"image_uuid": "<string>"
}'
{
"code": 123,
"msg": "<string>"
}
删除指定的个人镜像
curl --request POST \
--url https://www.chenyu.cn/api/open/v2/image/private/delete \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"image_uuid": "<string>"
}'
{
"code": 123,
"msg": "<string>"
}
import requests
url = "https://www.chenyu.cn/api/open/v2/image/private/delete"
headers = {
"Authorization": "Bearer your_api_key",
"Content-Type": "application/json"
}
data = {
"image_uuid": "img_12345678-1234-1234-1234-123456789012"
}
response = requests.post(url, headers=headers, json=data)
result = response.json()
if result['code'] == 0:
print("镜像删除成功")
else:
print(f"删除失败: {result['msg']}")
{
"code": 0,
"msg": "删除成功"
}