tencent cloud



Last updated: 2021-11-30 16:26:29
This document is currently invalid. Please refer to the documentation page of the product.

1. API Description

Domain name for API request: cls.tencentcloudapi.com.

This API is used to create an offline search task.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common parameter. The value used for this API: CreateAsyncSearchTask.
Version Yes String Common parameter. The value used for this API: 2020-10-16.
Region Yes String Common parameter. For more information, please see the list of regions supported by the product.
LogsetId Yes String Logset ID
TopicId Yes String Log topic ID. Currently, only log topics whose StorageType is cold are supported.
Query Yes String Query statement. Maximum length: 1024
From Yes Integer Start time of the log to be queried, which is a Unix timestamp in milliseconds
To Yes Integer End time of the log to be queried, which is a Unix timestamp in milliseconds
Sort No String Log scan order. Valid values: asc: ascending; desc: descending. Default value: desc

3. Output Parameters

Parameter Name Type Description
RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

4. Example

Example1 Creating offline search task

Input Example

Host: cls.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateAsyncSearchTask
<Common request parameters>

    "LogsetId": "4463e7b0-3ec8-41a1-ae48-5d24b22167c2",
    "TopicId": "f28b17c8-d339-4547-bfff-0953b7901355",
    "From": 1608794854000,
    "To": 1608794855000,
    "Query": "ERROR"

Output Example

  "Response": {
    "RequestId": "b276cb6e-4687-11eb-b378-0242ac130002"

5. Developer Resources


TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
FailedOperation.SyntaxError An error occurred while parsing the query statement.
FailedOperation.TopicNotSupport The log topic does not support this operation.
InvalidParameterValue Incorrect parameter value.
LimitExceeded.AsyncSearchTask The number of running offline search tasks exceeds the limit.
OperationDenied Operation denied.
OperationDenied.AccountDestroy The account has been terminated.
OperationDenied.AccountIsolate The account has overdue payments.
OperationDenied.AccountNotExists The account does not exist.
ResourceNotFound.LogsetNotExist The specified logset does not exist.
ResourceNotFound.TopicNotExist The log topic does not exist.
Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support