You need to enable JavaScript to run this app.
导航
DeleteAssets
最近更新时间:2025.01.23 14:19:43首次发布时间:2025.01.23 14:19:43

删除制品包文件。

说明

仅 Generic 类型仓库支持删除制品包文件。

请求说明

  • 请求方式:POST
  • 请求地址:https://open.volcengineapi.com/?Action=DeleteAssets&Version=2025-01-01

请求参数

参数名类型是否必选示例值描述
ActionStringDeleteAssets接口名称。当前 API 的名称为DeleteAssets
VersionString2025-01-01接口版本。当前 API 的版本为2025-01-01

Registry

String

artifacts-demo

制品仓库实例名称,仅支持 Generic 类型仓库。
可以调用 ListArtifactRegistries 接口,获取制品仓库实例名称。

PackageStringpakcage-demo目标制品包名称。
VersionStringversion1目标制品版本。
NamesArray of String["file.1"]目标文件名称。

请求示例

POST https://open.volcengineapi.com/?Action=DeleteAssets&Version=2025-01-01
Content-Type: application/json
{
    "Registry": "artifacts-demo",
    "Package": "pakcage-demo",
    "Version": "version1",
    "Names": ["file.1"]
}

返回参数

参数名类型示例值描述
SuccessesArray of Success-删除成功的文件名称。
FailuresArray of Failure-删除失败的文件名称。

返回示例

HTTP/1.1: 200 OK
Content-Type: application/json
{
    "ResponseMetadata": {
        "RequestId": "20250101110420****100232280022D31",
        "Action": "DeleteAssets",
        "Version": "2025-01-01",
        "Service": "artifacts",
        "Region": "cn-north-1"
    },
    "Result": {
        "Successes": [
        	{
        		"Name": "version1"
        	}
        ],
        "Failures": [
        	{
        		"Name": "version2",
        		"Reason": "tag version2 not exist"
        	}
        ]
    }
}