You need to enable JavaScript to run this app.
导航
创建伴随程序版本
最近更新时间:2025.01.20 15:42:49首次发布时间:2022.07.28 15:09:50

为指定伴随程序创建新版本。

请求方式

使用 POST 方式发起请求。

请求参数

下表仅列出了接口特有的请求参数和部分公共参数。完整的公共参数列表,参考 公共请求参数

字段
位置
类型
必填
说明
ActionQueryString公共参数,OpenAPI 接口名称CreateFrameworkAppVersion
VersionQueryString公共参数,OpenAPI 接口版本2022-02-10

Body 参数

字段
类型
必填
说明
framework_app_idString伴随程序 ID,可通过调用 ListFrameworkApp 接口获取
app_version_infoAppInformation伴随程序版本基本信息,参考以下 AppInformation 结构说明

AppInformation 结构说明

字段
类型
必填
说明
download_urlString伴随程序安装包下载地址,支持 HTTP 和 HTTPS
package_nameString伴随程序安装包名称,可通过调用 DetailParseTask 接口获取(需保证传入信息的准确性,否则启动伴随程序可能失败)
version_codeInt32伴随程序版本号,可通过调用 DetailParseTask 接口获取(需保证传入信息的准确性,否则启动伴随程序可能失败)
md5String伴随程序安装文件 MD5,可通过调用 DetailParseTask 接口获取(需保证传入信息的准确性,否则启动伴随程序可能失败)
package_sizeInt64安装文件大小,单位 byte,可通过调用 DetailParseTask 接口获取(对应 file_size 字段)

返回结果

通用返回参数,参考 ResponseMetadata 结构说明

Result 字段包含以下参数:

字段
类型
说明
version_idString如果伴随程序版本创建成功,返回创建的伴随程序版本 ID

示例

请求示例

POST https://open.volcengineapi.com?Action=CreateFrameworkAppVersion
&Version=2022-02-10
&<通过header传入的公共请求参数>

{
    "framework_app_id": "7122432503851xxxxxx",
    "app_version_info": {
        "download_url": "https://xxx-file.xxxxxx.com/cloudgame/xxxxxx.apk?x-expires=25862xxxxxx&x-signature=XXXXXX",
        "package_name": "com.image.frameworkappname",
        "version_code": 235,
        "md5": "5403bf7211ec9fb042a6825876xxxxxx",
        "package_size": 78460345
    }
}

返回示例

{
    "ResponseMetadata": {
        "Action": "CreateFrameworkAppVersion",
        "Region": "cn-north-1",
        "RequestId": "20220216115400010225110011010B9483",
        "Service": "veGame",
        "Version": "2022-02-10"
    },
    "Result": {
        "version_id": "7064470096059xxxxxx"
    }
}