文档中心>API 中心

查询渠道合作加固任务

最近更新时间:2024-04-03 11:24:14

我的收藏

1. 接口描述

接口请求域名: ms.tencentcloudapi.com 。

该接口供渠道合作应用加固使用,接口调用有白名单用户限制,用于查询加固任务,入参中的条件过滤字段均为精准匹配。支持功能点: 1. 多任务分页查询 2.根据任务Id唯一值查询单记录

默认接口请求频率限制:20次/秒。

推荐使用 API Explorer
点击调试
API Explorer 提供了在线调用、签名验证、SDK 代码生成和快速检索接口等能力。您可查看每次调用的请求内容和返回结果以及自动生成 SDK 调用示例。

2. 输入参数

以下请求参数列表仅列出了接口请求参数和部分公共参数,完整公共参数列表见 公共请求参数

参数名称 必选 类型 描述
Action String 公共参数,本接口取值:DescribeEncryptInstances。
Version String 公共参数,本接口取值:2018-04-08。
Region String 公共参数,详见产品支持的 地域列表
PageNumber Integer 多记录查询时使用,页码
PageSize Integer 多记录每页展示数量
OrderField String 多记录查询时排序使用 仅支持CreateTime 任务创建时间排序
示例值:“CreateTime”
OrderDirection String 升序(asc)还是降序(desc),默认:desc。
示例值:“desc”
PlatformType Integer (条件过滤字段) 平台类型 1.android加固 2.ios源码混淆 3.sdk加固 4.applet小程序加固
OrderType Integer (条件过滤字段) 订单采购类型 1-免费试用 2-按年收费 3-按次收费
EncryptOpType Integer (条件过滤字段) 1-在线加固 或 2-输出工具加固
ResultId String (条件过滤字段) 单记录查询时使用,结果ID该字段非空时,结构会根据结果ID进行单记录查询,符合查询条件时,只返回一条记录。
OrderId String (条件过滤字段) 查询与订单Id关联的任务
ResourceId String (条件过滤字段) 查询与资源Id关联的任务
AppType String (条件过滤字段) 应用类型:android-apk; android-aab;
AppPkgName String (条件过滤字段)应用的包名
EncryptState.N Array of Integer 加固结果,
0:正在排队;
1:加固成功;
2:加固中;
3:加固失败;
5:重试;
多记录查询时,根据查询结果进行检索使用。

3. 输出参数

参数名称 类型 描述
TotalCount Integer 总记录数
EncryptResults Array of EncryptResults 渠道合作加固信息数组
RequestId String 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。

4. 示例

示例1 根据ResultId进行单记录查询

根据ResultId进行单记录查询

输入示例

POST / HTTP/1.1
Host: ms.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeEncryptInstances
<公共请求参数>

{
    "ResultId": "6ef4eac9-badc-40d9-9796-569741849f95"
}

输出示例

{
    "Response": {
        "EncryptResults": [
            {
                "AndroidResult": null,
                "AppletResult": {
                    "AppletInfo": {
                        "AppletJsUrl": "http://xxxxxxx.zip",
                        "AppletLevel": 1,
                        "Name": "test.zip"
                    },
                    "CostTime": 13,
                    "CreatTime": "2023-06-05 18:02:50",
                    "EncryptErrCode": 0,
                    "EncryptErrDesc": "",
                    "EncryptErrRef": "",
                    "EncryptPkgUrl": "https://xxxxxxxx/test.zip",
                    "EncryptState": 1,
                    "EncryptStateDesc": "加固成功",
                    "EndTime": "2023-06-05 18:03:21",
                    "OpUin": 700000154106,
                    "OrderId": "20230605_96ca291a-6e84-47eb-xxxxxxx",
                    "ResourceId": "20230605_96ca291a-6e84-47eb-xxxxxxx_0",
                    "ResultId": "6ef4eac9-badc-40d9-9796-569741849f95",
                    "StartTime": "2023-06-05 18:02:55"
                },
                "EncryptOpType": 1,
                "EncryptOpTypeDesc": "在线加固",
                "IOSResult": null,
                "OrderType": 1,
                "OrderTypeDesc": "免费试用",
                "PlatformDesc": "applet小程序加固",
                "PlatformType": 4,
                "SDKResult": null,
                "ResourceId": "xxxxxxx",
                "OrderId": "xxxxxxxxxxxxxx"
            }
        ],
        "RequestId": "8019602c-b5be-4c90-932c-6e6f0e83c0bf",
        "TotalCount": 1
    }
}

示例2 查询Android在线加固成功任务

查询Android在线加固成功任务

输入示例

POST / HTTP/1.1
Host: ms.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeEncryptInstances
<公共请求参数>

{
    "PageNumber": 1,
    "PageSize": 1,
    "OrderField": "CreateTime",
    "OrderDirection": "asc",
    "PlatformType": 1,
    "OrderType": 1,
    "EncryptOpType": 1,
    "EncryptState": [
        1
    ]
}

输出示例

{
    "Response": {
        "EncryptResults": [
            {
                "AndroidResult": {
                    "AndroidPlan": {
                        "AppPkgName": "com.One.WoodenLetter",
                        "AppType": "apk",
                        "EncryptParam": "{\"dex\":{\"enable\":1,\"antiprotect\":1,\"antirepack\":1,\"dexsig\":1,\"antimonitor\":1,\"ptrace\":1}}",
                        "PlanId": 11975
                    },
                    "AppMd5": "881ac0a49b3ae9967022217730cc0da8",
                    "AppName": "XXXX",
                    "AppPkgName": "com.One.TEST",
                    "AppSize": 4743475,
                    "AppType": "apk",
                    "AppUrl": "https://xxxxx/test.apk",
                    "AppVersion": "7.8.1",
                    "BindAppPkgName": "com.One.TEST",
                    "CostTime": 24,
                    "CreatTime": "2023-05-31 10:27:29",
                    "EncryptAppMd5": "710f9c41259d183bd1461817b6940b9e",
                    "EncryptAppSize": 5725152,
                    "EncryptErrCode": 0,
                    "EncryptErrDesc": "",
                    "EncryptErrRef": "",
                    "EncryptPkgUrl": "https://xxxxxxx/encrypt_dist/legu_20230531115709_xxxx.apk",
                    "EncryptState": 1,
                    "EncryptStateDesc": "加固成功",
                    "EndTime": "2023-05-31 11:57:15",
                    "OnlineToolVersion": "4.5.1.8",
                    "OpUin": 700000154106,
                    "OrderId": "20230530_0068940c-56d8-4bb8-9952-xxxx",
                    "OutputToolSize": 0,
                    "OutputToolUrl": "",
                    "OutputToolVersion": "",
                    "ResourceId": "20230530_0068940c-56d8-4bb8-9952-xxxx_0",
                    "ResultId": "1be49343-9bc4-40c7-9df1-1398e4743731",
                    "StartTime": "2023-05-31 10:27:29",
                    "ToolExpireTime": "0000-00-00 00:00:00",
                    "ToolOutputTime": "0000-00-00 00:00:00"
                },
                "AppletResult": null,
                "EncryptOpType": 1,
                "EncryptOpTypeDesc": "在线加固",
                "IOSResult": null,
                "OrderType": 1,
                "OrderTypeDesc": "免费试用",
                "PlatformDesc": "android加固",
                "PlatformType": 1,
                "SDKResult": null,
                "ResourceId": "xxxxxxx",
                "OrderId": "xxxxxxxxxxxxxx"
            }
        ],
        "RequestId": "f83ad565-fe48-4d45-bdb8-e84c72e67df5",
        "TotalCount": 7
    }
}

示例3 查询Android输出工具任务结果

查询Android输出工具任务结果

输入示例

POST / HTTP/1.1
Host: ms.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeEncryptInstances
<公共请求参数>

{
    "EncryptOpType": 2,
    "ResultId": "0f869fd0-0fd0-44bd-95fc-06a15b50aa61"
}

输出示例

{
    "Response": {
        "EncryptResults": [
            {
                "AndroidResult": {
                    "AndroidPlan": {
                        "AppPkgName": "com.One.TEST",
                        "AppType": "apk",
                        "EncryptParam": "{\n    \"dex\": {\n        \"enable\": 1,\n        \"antiprotect\": 1,\n        \"antirepack\": 1,\n        \"dexsig\": 1,\n        \"antimonitor\": 1,\n        \"ptrace\": 1\n    },\n    \"so\": {\n        \"enable\": 0,\n        \"ver\": \"1.3.3\",\n        \"file\": [\n            \"\"\n        ]\n    },\n    \"vmp\": {\n        \"enable\": 0,\n        \"ndkpath\": \"/xxx/android-ndk-r10e\",\n        \"profile\": \"XXX\",\n        \"mapping\": \"XXX\"\n    },\n    \"respro\": {\n        \"assets\": {\n            \"enable\": 0,\n            \"file\": [\n                \"assets/1.js\",\n                \"assets/2.jpg\"\n            ]\n        },\n        \"res\": {\n            \"enable\": 0,\n            \"file\": [\n                \"res/layout/1.xml\",\n                \"res/layout/2.xml\"\n            ]\n        }\n    }\n}",
                        "PlanId": 12011
                    },
                    "AppMd5": "",
                    "AppName": "",
                    "AppPkgName": "com.One.TEST",
                    "AppSize": 0,
                    "AppType": "apk",
                    "AppUrl": "",
                    "AppVersion": "",
                    "BindAppPkgName": "com.One.TEST",
                    "CostTime": 13,
                    "CreatTime": "2023-06-05 17:51:25",
                    "EncryptAppMd5": "",
                    "EncryptAppSize": 0,
                    "EncryptErrCode": 0,
                    "EncryptErrDesc": "",
                    "EncryptErrRef": "",
                    "EncryptPkgUrl": "",
                    "EncryptState": 1,
                    "EncryptStateDesc": "加固成功",
                    "EndTime": "2023-06-05 17:51:51",
                    "OnlineToolVersion": "",
                    "OpUin": 700000154106,
                    "OrderId": "20230605_52f727b2-8c5c-4069-b940-xxxxxxx",
                    "OutputToolSize": 109411473,
                    "OutputToolUrl": "https://xxxxxxxxx/xxxx-com.One.TEST-20230605.zip",
                    "OutputToolVersion": "4.5.1.8",
                    "ResourceId": "20230605_52f727b2-8c5c-4069-b940-xxxxxxx_0",
                    "ResultId": "0f869fd0-0fd0-44bd-95fc-06a15b50aa61",
                    "StartTime": "2023-06-05 17:51:33",
                    "ToolExpireTime": "2024-06-07 00:00:00",
                    "ToolOutputTime": "2023-06-05 17:51:47"
                },
                "AppletResult": null,
                "EncryptOpType": 2,
                "EncryptOpTypeDesc": "输出工具",
                "IOSResult": null,
                "OrderType": 2,
                "OrderTypeDesc": "按年收费",
                "PlatformDesc": "android加固",
                "PlatformType": 1,
                "SDKResult": null,
                "ResourceId": "xxxxxxx",
                "OrderId": "xxxxxxxxxxxxxx"
            }
        ],
        "RequestId": "59af19a2-9729-4397-a229-6ee8e8a15a1e",
        "TotalCount": 1
    }
}

示例4 小程序在线加固结果查询示例

小程序在线加固结果查询示例

输入示例

POST / HTTP/1.1
Host: ms.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeEncryptInstances
<公共请求参数>

{
    "PlatformType": 4,
    "OrderType": 1,
    "EncryptOpType": 1,
    "EncryptState": [
        1
    ]
}

输出示例

{
    "Response": {
        "EncryptResults": [
            {
                "AndroidResult": null,
                "IOSResult": null,
                "SDKResult": null,
                "AppletResult": {
                    "AppletInfo": {
                        "AppletJsUrl": "http://xxxxxxxxxxx.zip",
                        "AppletLevel": 1,
                        "Name": "test.zip"
                    },
                    "CostTime": 13,
                    "CreatTime": "2023-06-05 18:02:50",
                    "EncryptErrCode": 0,
                    "EncryptErrDesc": "",
                    "EncryptErrRef": "",
                    "EncryptPkgUrl": "https://xxxxxxxxxxxx/xxxxx/test.zip",
                    "EncryptState": 1,
                    "EncryptStateDesc": "加固成功",
                    "EndTime": "2023-06-05 18:03:21",
                    "OpUin": 700000154106,
                    "OrderId": "20230605_96ca291a-6e84-47eb-xxxxx-xxxxxx",
                    "ResourceId": "20230605_96ca291a-6e84-47eb-xxxxx-xxxxxx_0",
                    "ResultId": "6ef4eac9-badc-40d9-9796-569741849f95",
                    "StartTime": "2023-06-05 18:02:55"
                },
                "EncryptOpType": 1,
                "EncryptOpTypeDesc": "在线加固",
                "OrderType": 1,
                "OrderTypeDesc": "免费试用",
                "PlatformDesc": "applet小程序加固",
                "PlatformType": 4,
                "ResourceId": "xxxxxxx",
                "OrderId": "xxxxxxxxxxxxxx"
            }
        ],
        "RequestId": "3a25bb5e-6334-449c-b4bf-bbea1e673e3a",
        "TotalCount": 1
    }
}

5. 开发者资源

腾讯云 API 平台

腾讯云 API 平台 是综合 API 文档、错误码、API Explorer 及 SDK 等资源的统一查询平台,方便您从同一入口查询及使用腾讯云提供的所有 API 服务。

API Inspector

用户可通过 API Inspector 查看控制台每一步操作关联的 API 调用情况,并自动生成各语言版本的 API 代码,也可前往 API Explorer 进行在线调试。

SDK

云 API 3.0 提供了配套的开发工具集(SDK),支持多种编程语言,能更方便的调用 API。

命令行工具

6. 错误码

以下仅列出了接口业务逻辑相关的错误码,其他错误码详见 公共错误码

错误码 描述
AuthFailure CAM签名/鉴权错误。
InvalidParameter 参数错误。
InvalidParameter.ParameterError 参数格式错误。
InvalidParameterValue 参数取值错误。
MissingParameter 缺少参数错误。
UnauthorizedOperation 未授权操作。
UnauthorizedOperation.NotWhiteUser 不是白名单用户。