You need to enable JavaScript to run this app.
Torch Log Service

Torch Log Service

Copy page
Download PDF
Invocation method
Request structure
Copy page
Download PDF
Request structure
This document introduces the basic structure of TLS OpenAPI requests.​
TLS OpenAPI requests mainly consist of three parts:​
  • Request URL: Points to a specific business request.​
  • Request header: Includes the authentication information required for the API request.​
  • Request body: Includes the request parameters corresponding to the API. Do not pass the Body for interfaces without request parameters.​
Each API document provides a request example for your reference; please implement the code yourself before initiating the request. When the interface call is successful, the returned parameters are displayed; if the call fails, the corresponding error message is shown. You can analyze and troubleshoot based on the error code.​
Request URL​
You can invoke the TLS API service by sending HTTPS requests. Https request URL format:​
​
https://{tls-endpoint}/{Action}?&parameters​
&<Public request parameter>​
​
Note:​
​
Parameter​
Description​
tls-endpoint​
The service address (Endpoint) of TLS, that is, the server domain name or IP address that hosts the service endpoint.​
Region refers to the region where the project is located. For more details, see Service address.​
Action​
Actions to be performed.​
Please enter the API endpoint to be called. For TLS API interfaces, please refer to API List.​
parameters​
The API's request parameters in the URL.​
  • Query-type APIs require business parameters to be included in the request URL, for example, Describe* APIs.​
  • Other API endpoints pass business parameters directly in the body.​
Public request parameters​
Other public request parameters required by the business.​
​
For example, to view projects (DescribeProjects), the unencoded HTTPS request URL is as follows.​
​
GET https://{tls-endpoint}/DescribeProjects?PageNumber=1&PageSize=10​
​
Request headers​
The HTTP request header must specify Content-Type and public parameters, such as request authentication information, which are used to identify the user and the interface signature. Unless it is necessary to do so, individual API documentation will no longer describe these parameters; however, every request must include these parameters for the request to be initiated properly.​
The Content-Type header specifies the structured format of the request body, and the Content-Type for TLS is always set to application/json. For the detailed parameter list and description, please refer to Common parameters.​
Request body​
The request body, also known as the request message body, is primarily used to transmit business-related request parameters. To support Chinese in parameters in the request message body, Chinese characters must be encoded in UTF-8.​
The content of the request message body differs for each interface, and not every interface requires a request message body (that is, the message body may be empty). When calling an interface, refer to the documentation for each API to construct the request message body.​
Request methods​
Request methods are used to communicate the type of operation for the current request to the server. TLS supports the following HTTP request methods.​
​
Method​
Description​
GET​
Request the specified resource from the server.​
PUT​
Request the server to update the specified resource.​
POST​
Request that the server add new resources or perform special operations.​
DELETE​
Request deletion of the specified resource from the server.​
​
Initiate a request​
You can use curl, Postman, write code directly, or use other methods to send requests to call the API. For example, the request example for the ModifyProject interface is as follows:​
​
PUT https://{tls-endpoint}/ModifyProject HTTP/1.1​
Content-Type: application/json​
...​
{​
"ProjectName":"newproject",​
"Description":"server log",​
"ProjectId":"20e84633-51a0-4006-8bfd-f16235d0****"​
}​
​
​
Last updated: 2025.12.05 15:43:40