文档

CreateTicket4Copilot - 生成智能小Q嵌入Ticket

更新时间:

用于生成智能小Q嵌入Ticket。

调试

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

授权信息

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

请求参数

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

开通嵌入的智能小 Q 模块 ID。

ccd3428c-dd23-460c-a608-26bae29dffee
TicketNuminteger

ticket 的票据数量取值范围:

  • 默认值为 1。

  • 建议值为 1。

  • 最大值为 99999。

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

1
UserIdstring

Quick BI 的 UserId。

  • 您可以调用【3.1.7 根据三方账号获取用户具体信息】或者其他接口获取。

注意 注意:userId 和 accountName 只填一个即可,不填时默认绑定报表的 owner,访问报表时将以该用户身份访问。

9c-asdawf-casxcasd-asdasd
AccountNamestring

用户的账号名称。

注意 注意:userId 和 accountName 只填一个即可,不填时默认绑定报表的 owner,访问报表时将以该用户身份访问。

测试用户
AccountTypeinteger

用户的账号类型:

  • 1:阿里云主账号

  • 3:QuickBI 自建账号。

  • 4:钉钉

  • 5:阿里云 RAM 账号

  • 6:三方账号(SAML、OAuth 等协议对对接的账号)

  • 9:企业微信

  • 10:飞书

注意 注意:accountName 不为空,则 accountType 不能为空。

1
ExpireTimeinteger

过期时间。

  • 单位分钟,最大 240(4 小时)。

  • 默认 240。

200

返回参数

名称类型描述示例值
object
RequestIdstring

请求 ID。

D787E1A3-A93C-424A-B626-C2B05DF8D885
Resultstring

开通嵌入的智能小 Q 模块 ID。

f5eeb52e-d9c2-4a8b-80e3-47ab55c2****
Successboolean

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

  • true:请求成功

  • false:请求失败

true

示例

正常返回示例

JSON格式

{
  "RequestId": "D787E1A3-A93C-424A-B626-C2B05DF8D885",
  "Result": "f5eeb52e-d9c2-4a8b-80e3-47ab55c2****",
  "Success": true
}

错误码

HTTP status code错误码错误信息描述
400Internal.System.ErrorAn internal system error occurred.系统内部异常。
400Instance.ExpiredYour instance has expired.您的购买实例已经过期。
400Instance.Not.ExistThe specified instance does not exist.暂未匹配到您的购买实例。
400Invalid.OrganizationThe specified organizational unit does not exist.该组织不存在。
400User.Not.In.OrganizationThe specified user is not in the organizational unit.该用户不在组织中。
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.个人信息不合法。
400ApiUser.Not.ExistsThe specified user does not exist.用户不存在。
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.操作组件不存在或已被删除。
400Not.ApiCall.AuthUserYou are not an administrator or API call auth user of this organization.非组织管理员或API调用授权用户。
500Authorize3rdTicket.Num.HasNoLeftThere is no ticket number left, please generate new ticket.当前票据已消费完毕,请重新生成。
500CopilotEmbed.Config.NotFindCan not find copilot embed config with this copilot ID.找不到此嵌入配置

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