POST
/
api
/
open
/
v2
/
image
/
private
/
delete
删除个人镜像
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>"
}

删除个人镜像

删除用户指定的个人镜像。
删除操作不可逆,请谨慎操作。删除后镜像数据将无法恢复。

请求参数

image_uuid
string
required
要删除的镜像uuid

响应参数

code
integer
响应码
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": "删除成功"
}