Generate an embedding ticket for Smart Q.
Debugging
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 Resourcesis 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.
| Operation | Access level | Resource type | Condition key | Associated operation |
|---|---|---|---|---|
| quickbi-public:CreateTicket4Copilot | create | *All Resources * |
| none |
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| CopilotId | string | Yes | ID of the Smart Q module to be embedded. | ccd3*********ae29dffee |
| TicketNum | integer | No | Range of ticket quantity:
Each time a ticket is used, the ticket count decreases by 1. | 1 |
| UserId | string | No | Quick BI's UserId.
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 |
| AccountName | string | No | 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 |
| AccountType | integer | No | User's account type:
Notice Note: If accountName is not empty, then accountType must also be provided. | 1 |
| ExpireTime | integer | No | Expiration time.
| 200 |
Response parameters
Examples
Sample success responses
JSONformat
{
"RequestId": "D787************05DF8D885",
"Result": "f5eeb52e-d9c2-4a8b-80e3-47ab55c2****",
"Success": true
}Error codes
| HTTP status code | Error code | Error message | Description |
|---|---|---|---|
| 400 | CopilotEmbed.Config.NotFind | Can not find copilot embed config with this copilot ID. | Cannot find this embedded configuration |
| 400 | Authorize3rdTicket.Num.HasNoLeft | There is no ticket number left, please generate new ticket. | - |
| 400 | Invalid.Param.Error | The parameter is invalid. | The parameter is invalid. |
| 400 | Authorize3rdTicket.Num.Exceed | The number of tickets %s is invalid. | - |
For a list of error codes, visit the Service error codes.
