CreateTicket

Updated at: 2025-02-12 10:22

Obtains a ticket. Simple Log Service allows you to share the query and analysis pages and dashboard pages with other users and embed the console pages into third-party systems. This way, other users can view your logs in password-free mode. The URLs of the shared pages are referred to as password-free URLs. You can call the CreateTicket operation to obtain a ticket and generate a password-free URL based on the ticket and the URL of the console page that you want to share.

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

There is currently no authorization information disclosed in the API.

Request syntax

POST /tickets HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
ParameterTypeRequiredDescriptionExample
expirationTimelongNo
  • You must use the Simple Log Service endpoint for the China (Shanghai) or Singapore region to call the CreateTicket operation. After you obtain the ticket, you can use the ticket regardless of the region.
  • The validity period for the URL of the console page that you want to embed. Unit: seconds. Default value: 86400, which specifies one day. Valid values: 0 to 2592000. The value 2592000 specifies 30 days.
86400
accessTokenExpirationTimelongNo
  • The validity period of the access token. Unit: seconds. Default value: 86400, which specifies one day. Valid values: 0 to 86400.
  • The validity period of the access token is the smaller value between accessTokenExpirationTime and expirationTime.
  • If you use a Security Token Service (STS) token to call this operation, the validity period of the access token is the smallest value among accessTokenExpirationTime, expirationTime, and the validity period of the STS token.
600

Response parameters

ParameterTypeDescriptionExample
ParameterTypeDescriptionExample
headersobject
Content-Typestring
Serverstring
Content-Lengthstring
Datestring
Connectionstring
x-log-requestidstring
object

The returned struct.

ticketstring

The ticket that is used for logon-free access.

eyJ***************.eyJ******************.KUT****************

Examples

Sample success responses

JSONformat

{
  "ticket": "eyJ***************.eyJ******************.KUT****************"
}

Error codes

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

  • On this page (1)
  • Debugging
  • Authorization information
  • Request syntax
  • Request parameters
  • Response parameters
  • Examples
  • Error codes
Feedback