Listing Tickets
Function
This API is used to list valid tickets.
URI
GET /v1/{project_id}/tickets
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For how to obtain the project ID, see Obtaining a Project ID. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
user_id |
No |
String |
User ID. |
user_name |
No |
String |
Username. |
user_type |
No |
Integer |
User type. |
embed_id |
No |
String |
Embedded analytics ID. |
limit |
No |
Integer |
Number of returned entries. If not transferred, the first 10 records are queried by default. Value range: [0, 1000]. Default value: 10. |
offset |
No |
Integer |
Start offset of returned entries. Value range: [0, 1000]. Default value: 0. |
sort_dir |
No |
String |
Whether query results are displayed in descending order. |
sort_key |
No |
String |
Sorting field. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. Obtain a user token by calling IAM's "Obtaining a User Token" API. X-Subject-Token in the response header is the desired user token. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
count |
Integer |
Total number of data records. |
page_data |
Array of Table 7-9 objects |
Data on the current page. |
Parameter |
Type |
Description |
---|---|---|
ticket |
String |
Ticket. |
embed_id |
String |
ID of the embedded analytics to which the ticket is bound. |
expire_time |
String |
Ticket expiration time. |
left_num |
String |
Number of remaining times that the ticket can be used. |
user_id |
String |
ID of the user to whom the ticket is bound. |
user_name |
String |
Name of the user to whom the ticket is bound. |
user_type |
String |
Type of the user to which the ticket is bound. |
group_ids |
Array of strings |
ID of the user group to which the ticket is bound. |
Example Request
Request ticket list.
GET https://{endpoint}/v1/{project_id}/tickets
Example Response
Status code: 200
The ticket list is obtained.
{ "count": 2, "page_data": [ { "ticket": "848803f514dxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "embed_id": "3577e712-xxxxxxxxxxxxxxxxxxxxxxxxxxxx", "expire_time": "2024-08-26 20:48:52 (GMT+08:00)", "left_num": 1000, "user_id": "aaa18eb1xxxxxxx", "user_name": "user_a", "user_type": "IAM", "group_ids": [] }, { "ticket": "22a01f2f8cxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "embed_id": "3577e712xxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "expire_time": "2024-08-26 20:48:45 (GMT+08:00)", "left_num": 1000, "user_id": "16246eaxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "user_name": "user_b", "user_type": "IAM", "group_ids": [] } }
Status Codes
Status Code |
Description |
---|---|
200 |
The ticket list is obtained. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot