查询模板
1. 接口描述
接口请求域名: ess.tencentcloudapi.com 。
当模板较多或模板中的控件较多时,可以通过查询模板接口更方便的获取模板列表,以及每个模板内的控件信息。
该接口常用来配合“创建电子文档”接口作为前置的接口使用。
默认接口请求频率限制:300次/秒。
推荐使用 API Explorer
点击调试API Explorer 提供了在线调用、签名验证、SDK 代码生成和快速检索接口等能力。您可查看每次调用的请求内容和返回结果以及自动生成 SDK 调用示例。
2. 输入参数
以下请求参数列表仅列出了接口请求参数和部分公共参数,完整公共参数列表见 公共请求参数。
参数名称 | 必选 | 类型 | 描述 |
---|---|---|---|
Action | 是 | String | 公共参数,本接口取值:DescribeFlowTemplates。 |
Version | 是 | String | 公共参数,本接口取值:2020-11-11。 |
Region | 否 | String | 公共参数,本接口不需要传递此参数。 |
Operator | 是 | UserInfo | 调用方用户信息,userId 必填 |
Agent | 否 | Agent | 代理相关应用信息,如集团主企业代子企业操作的场景中ProxyOrganizationId必填 |
ContentType | 否 | Integer | 查询内容:0-模板列表及详情(默认),1-仅模板列表 |
Filters.N | 否 | Array of Filter | 搜索条件,具体参考Filter结构体。本接口取值:template-id:按照【 模板唯一标识 】进行过滤 |
Offset | 否 | Integer | 查询偏移位置,默认0 |
Limit | 否 | Integer | 查询个数,默认20,最大200 |
ApplicationId | 否 | String | 这个参数跟下面的IsChannel参数配合使用。 IsChannel=false时,ApplicationId参数不起任何作用。 IsChannel=true时,ApplicationId为空,查询所有第三方应用集成平台企业模板列表;ApplicationId不为空,查询指定应用下的模板列表 ApplicationId为空,查询所有应用下的模板列表 |
IsChannel | 否 | Boolean | 默认为false,查询SaaS模板库列表; 为true,查询第三方应用集成平台企业模板库管理列表 |
3. 输出参数
参数名称 | 类型 | 描述 |
---|---|---|
Templates | Array of TemplateInfo | 模板详情列表 |
TotalCount | Integer | 查询到的总数 |
RequestId | String | 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 |
4. 示例
示例1 模板查询接口
查询企业模板列表
输入示例
POST / HTTP/1.1
Host: ess.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeFlowTemplates
<公共请求参数>
{
"Operator": {
"UserId": "string"
},
"Offset": 0,
"Limit": 20,
"ContentType": 0,
"Filters": [
{
"Key": "template-id",
"Values": [
"16250***********49e047d8"
]
}
]
}
输出示例
{
"Response": {
"Templates": [
{
"TemplateId": "162509******b1949e047d8",
"TemplateName": "string",
"Description": "test",
"DocumentResourceIds": [
"123456******7812345678"
],
"FileInfos": [
{
"CreatedOn": 1234567890,
"FileId": "0410049******2494f43bb",
"FileName": "7530fbd040c*********26aaf-verify.pdf",
"FileSize": 45435
}
],
"AttachmentResourceIds": [
"string"
],
"Promoter": {
"RecipientId": "0",
"RecipientType": "PROMOTER",
"Description": "发起人角色",
"RoleName": "发起人",
"RequireValidation": "False",
"RequireSign": "False",
"RoutingOrder": 0,
"RequireDelivery": "False",
"Email": "123@tencent.com",
"Mobile": "12332112345",
"UserId": "",
"DeliveryMethod": "email",
"RecipientExtra": ""
},
"SignOrder": [
0,
1
],
"Recipients": [
{
"RecipientId": "1",
"RecipientType": "enterprise",
"Description": "",
"RoleName": "企业",
"RequireValidation": "False",
"RequireSign": "True",
"RoutingOrder": 0,
"RequireDelivery": "True",
"Email": "123@tencent.com",
"Mobile": "12332112345",
"UserId": "",
"DeliveryMethod": "email",
"RecipientExtra": ""
},
{
"RecipientId": "2",
"RecipientType": "enterprise",
"Description": "",
"RoleName": "企业HR",
"RequireValidation": "False",
"RequireSign": "True",
"RoutingOrder": 0,
"RequireDelivery": "True",
"Email": "123@tencent.com",
"Mobile": "12332112345",
"UserId": "",
"DeliveryMethod": "email",
"RecipientExtra": ""
}
],
"Components": [
{
"ComponentRecipientId": "1",
"ComponentId": "string",
"ComponentName": "string",
"ComponentType": "string",
"ComponentRequired": true,
"ComponentWidth": 1.1,
"ComponentHeight": 12.142,
"ComponentPage": 1,
"ComponentPosX": 1241.15,
"ComponentPosY": 125.12,
"ComponentExtra": "string",
"FileIndex": 0
}
],
"SignComponents": [
{
"ComponentRecipientId": "1",
"ComponentId": "string",
"ComponentName": "string",
"ComponentType": "string",
"ComponentRequired": true,
"ComponentWidth": 1.1,
"ComponentHeight": 12.142,
"ComponentPage": 1,
"ComponentPosX": 1241.15,
"ComponentPosY": 125.12,
"ComponentExtra": "string",
"FileIndex": 0
}
],
"Status": 0
}
],
"TotalCount": 10,
"RequestId": "test"
}
}
5. 开发者资源
腾讯云 API 平台
腾讯云 API 平台 是综合 API 文档、错误码、API Explorer 及 SDK 等资源的统一查询平台,方便您从同一入口查询及使用腾讯云提供的所有 API 服务。
API Inspector
用户可通过 API Inspector 查看控制台每一步操作关联的 API 调用情况,并自动生成各语言版本的 API 代码,也可前往 API Explorer 进行在线调试。
SDK
云 API 3.0 提供了配套的开发工具集(SDK),支持多种编程语言,能更方便的调用 API。
- Tencent Cloud SDK 3.0 for Python
- Tencent Cloud SDK 3.0 for Java
- Tencent Cloud SDK 3.0 for PHP
- Tencent Cloud SDK 3.0 for Go
- Tencent Cloud SDK 3.0 for NodeJS
- Tencent Cloud SDK 3.0 for .NET
- Tencent Cloud SDK 3.0 for C++
- Tencent Cloud SDK 3.0 for Ruby
命令行工具
6. 错误码
以下仅列出了接口业务逻辑相关的错误码,其他错误码详见 公共错误码。
错误码 | 描述 |
---|---|
FailedOperation | 操作失败。 |
FailedOperation.NotFoundShadowUser | 未找到集团子企业相关用户信息,请检查用户相关参数 |
InternalError | 内部错误。 |
InternalError.Db | 数据库异常。 |
InternalError.DependsApi | 依赖的第三方API返回错误。 |
InternalError.DependsDb | 数据库执行错误。 |
InternalError.System | 系统错误,请稍后重试。 |
InvalidParameter | 参数错误。 |
InvalidParameter.ContentType | 不合法的模板查询类型,请检查后重试。 |
InvalidParameter.ParamError | 参数错误。 |
InvalidParameterValue | 参数取值错误。 |
InvalidParameterValue.Mask | 需要屏蔽的告警。 |
MissingParameter | 缺少参数错误。 |
MissingParameter.UserId | 缺少用户id,请检查后重试。 |
OperationDenied.ErrNoResourceAccess | 此企业无该资源使用权限。 |
OperationDenied.Forbid | 禁止此项操作。 |
OperationDenied.NoIdentityVerify | 未通过个人实名认证。 |
OperationDenied.NoLogin | 用户未登录,请先登录后再操作。 |
ResourceNotFound.Application | 应用号不存在或已删除。 |
ResourceNotFound.Template | 模板不存在,请检查模板参数,模板配置,并稍后重试。 |
ResourceUnavailable | 资源不可用。 |
UnauthorizedOperation | 未授权操作。 |
UnauthorizedOperation.NoPermissionFeature | 请升级到对应版本后即可使用该接口。 |
UnknownParameter | 未知参数错误。 |