文档

CreateTicket - 生成报表嵌入ticket

更新时间:

生成报表嵌入需要使用的ticket。

接口说明

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息

当前API暂无授权信息透出。

请求参数

名称类型必填描述示例值
WorksIdstring

开通嵌入的报表 ID。 目前仅支持仪表板,电子表格,自助取数和大屏。

a206f5f3-****-e9b17c835b03
CmptIdstring

组件 ID。为以上仪表板中某个组件的 ID,其他作品类型不支持。 获取组件 ID 调用的接口请参见 QueryWorksBloodRelationship

0fc6a275c7f64f17b1****a306ce0f31
TicketNuminteger

Ticket 的票据数量,每次使用票据访问后,Ticket 的票据数量减 1。

  • 默认值为 1。
  • 建议值为 1。
  • 最大值为 99999。
1
UserIdstring

Quick BI 的 UserId,非您的阿里云账号 ID。 您可以调用 QueryUserInfoByAccount 接口,获取 UserId。UserId 样例为 fe67f61a35a94b7da1a34ba174a7****。

说明 UserId 和 AccountName 只填一个即可,不填时默认绑定报表的 Owner,访问报表时将以该用户身份访问。若您需要配置数据行级权限,请参见行级权限
46e537466****92704c8
AccountNamestring

用户的账号名称。

  • 如果用户是阿里云主账号 wangwu,格式为**[主账号]**,例如 wangwu
  • 如果用户是 RAM 账号 zhangsan@aliyun.cn**,格式为**[主账号:子账号],例如wangwu:zhangsan****。
说明 UserId 和 AccountName 只填一个即可,不填时默认绑定报表的 Owner,访问报表时将以该用户身份访问。若您需要配置数据行级权限,请参见行级权限
测试用户
AccountTypeinteger

用户的账号类型。

  • 1:阿里云账号
  • 3:Quick BI 自建账号
  • 4:钉钉
  • 5:RAM 子账号
  • 9:企业微信
  • 10:飞书
说明 若 AccountName 不为空时,则 AccountType 也不能为空。
1
ExpireTimeinteger

过期时间

  • 单位:分钟
  • 默认:240
200
WatermarkParamstring

报表的水印参数。

  • 不得超过 50 个字符。
  • 当报表类型为大屏时,不支持水印传参。
三方嵌入
GlobalParamstring

报表过滤条件的全局参数。

  • JsonArray 格式的字符串。
说明 若您需要使用全局参数能力,请联系Quick BI 运营负责人
[{"paramKey":"price","joinType":"and","conditionList":[{"operate":">","value":"0"}]}]

返回参数

名称类型描述示例值
object
RequestIdstring

请求 ID。

D787E1A3-A93C-424A-B626-C2B05DF8D885
Resultstring

生成 ticket 的值。

ccd3428c-****-****-a608-26bae29dffee
Successboolean

是否请求成功。取值范围:

  • true:请求成功
  • false:请求失败
true

示例

正常返回示例

JSON格式

{
  "RequestId": "D787E1A3-A93C-424A-B626-C2B05DF8D885",
  "Result": "ccd3428c-****-****-a608-26bae29dffee",
  "Success": true
}

错误码

HTTP status code错误码错误信息描述
400Internal.System.ErrorAn internal system error occurred.系统内部异常。
400Authorize3rdTicket.BindedWorks.MismatchThe report bound by the ticket mismatches the actual report.Ticket绑定的报表与访问页面报表不一致。
400Authorize3rdTicket.ExpiredTicket [%s] has expired.当前票据[%s]已过期。
400Authorize3rdTicket.HasNo.LoginTokenThe request [%s] has no token.当前请求 [%s] 未找到token信息。
400Authorize3rdTicket.NotExistTicket %s does not exist.当前票据%s不存在。
400Authorize3rdTicket.Num.ExceedThe number of tickets %s is invalid.票据数量不合法。
400Authorize3rdTicket.Num.HasNoLeftThere is no ticket number left, please generate new ticket.当前票据已消费完毕,请重新生成。
400Report.NotExist.ErrorThis work does not exist. It may have been deleted. Work ID is %s.作品不存在,可能已经被删除。作品ID:%s。
400Authorize3Rd.Report.UnauthorizedThe report is not enabled for third party embedding.报表未开通三方嵌入,请开通后重试。
400Cube.Not.ExistThe Cube does not exist.数据集不存在。
400Datasource.NotFound.ErrorThe specified data source does not exist: %s.数据源不存在:%s。
400Report.NotExistThe dashboard does not exist.当前仪表板不存在。
400Organization.Workspace.InconformityThe workspace does not match the organization.工作空间与组织不一致。
400ApiUser.Not.ExistsThe specified user does not exist.用户不存在。
400Parameter.Length.ExceedParameter length exceeds maximum limit: [%s].参数长度超过限制:%s。
400Invalid.User.OrganizationThe user is not in your organization.该用户不在您的组织中。
400GlobalParam.Restricted.UseThe global parameter function is restricted in your version.当前版本不可用全局参数
400Authorize3rdTicket.Unsupport.ScreenWatermarkScreen embed does not support watermark parameters.大屏嵌入不支持水印参数。
400Instance.ExpiredYour instance has expired.您的购买实例已经过期。
400Instance.Not.ExistThe specified instance does not exist.暂未匹配到您的购买实例。
400Invalid.OrganizationThe specified organizational unit does not exist.该组织不存在。
400Invalid.ParameterAn error occurred while verifying parameters.参数验证失败。
400Invalid.Parameter.ErrorThe parameter is invalid:%s.无效参数%s。
400Invalid.Param.ErrorThe parameter is invalid.无效参数。
400Invalid.User.AdminYou are not an administrator of this organization.没有权限,您不是组织管理员。
400System.Param.EmptyYou must specify the %s parameter.参数%s不能为空。
400Access.ForbiddenYour instance version or access key is not allowed to call the API operation, only professional version supports calling.您的实例版本或者 AccessKey不允许调用该 API,仅专业版支持调用。
400UserInfo.ErrorThe personal information is invalid.个人信息不合法。
400User.Not.WorkspaceAdminOnly administrators of the group workspace can perform this operation.没有权限,您不是该群空间的管理员。
400Application.Object.NotExistThe object you are operating does not exist or has been deleted.操作组件不存在或已被删除。

访问错误中心查看更多错误码。

变更历史

变更时间变更内容概要操作
2023-10-24OpenAPI 错误码发生变更看变更集
变更项变更内容
错误码OpenAPI 错误码发生变更
    错误码 400 变更
2022-03-04OpenAPI 错误码发生变更看变更集
变更项变更内容
错误码OpenAPI 错误码发生变更
    错误码 400 变更
  • 本页导读 (0)
文档反馈