All Products
Search
Document Center

Quick BI:CreateTicket4Copilot

Last Updated:Nov 04, 2025
This topic is generated by a machine translation engine without any human intervention. ALIBABA CLOUD DOES NOT GUARANTEE THE ACCURACY OF MACHINE TRANSLATED CONTENT. To request a human-translated version of this topic or provide feedback on this translation, please include it in the feedback form.

Generate an embedding ticket for Smart Q.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
quickbi-public:CreateTicket4Copilotcreate
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
CopilotIdstringYes

ID of the Smart Q module to be embedded.

ccd3*********ae29dffee
TicketNumintegerNo

Range of ticket quantity:

  • Default value is 1.

  • Recommended value is 1.

  • Maximum value is 99999.

Each time a ticket is used, the ticket count decreases by 1.

1
UserIdstringNo

Quick BI's UserId.

  • You can obtain this by calling [3.1.7 Get User Details Based on Third-Party Account] or other relevant APIs.

Notice Note: Only one of userId and accountName needs to be filled in. If neither is provided, it will default to the report owner, and the report will be accessed with that user's identity.

9c-asd*****asd-asdasd
AccountNamestringNo

User's account name.

Notice Note: Only one of userId and accountName needs to be filled in. If neither is provided, it will default to the report owner, and the report will be accessed with that user's identity.

Test user
AccountTypeintegerNo

User's account type:

  • 1: Alibaba Cloud Primary Account

  • 3: Quick BI Self-built Account

  • 4: DingTalk

  • 5: Alibaba Cloud RAM Account

  • 6: Third-party Account (SAML, OAuth, etc.)

  • 9: WeCom

  • 10: Feishu

Notice Note: If accountName is not empty, then accountType must also be provided.

1
ExpireTimeintegerNo

Expiration time.

  • Unit: minutes, maximum 240 (4 hours).

  • Default: 240.

200

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

Request ID.

D787************05DF8D885
Resultstring

ID of the Smart Q module to be embedded.

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

Indicates whether the request was successful. Possible values:

  • true: The request succeeded
  • false: The request failed
true

Examples

Sample success responses

JSONformat

{
  "RequestId": "D787************05DF8D885",
  "Result": "f5eeb52e-d9c2-4a8b-80e3-47ab55c2****",
  "Success": true
}

Error codes

HTTP status codeError codeError messageDescription
400CopilotEmbed.Config.NotFindCan not find copilot embed config with this copilot ID.Cannot find this embedded configuration
400Authorize3rdTicket.Num.HasNoLeftThere is no ticket number left, please generate new ticket.-
400Invalid.Param.ErrorThe parameter is invalid.The parameter is invalid.
400Authorize3rdTicket.Num.ExceedThe number of tickets %s is invalid.-

For a list of error codes, visit the Service error codes.