tencent cloud

APIs

CreateSearchView

Baixar
Modo Foco
Tamanho da Fonte
Última atualização: 2026-06-10 15:00:43

1. API Description

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

Create a query view

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 Params. The value used for this API: CreateSearchView.
Version Yes String Common Params. The value used for this API: 2020-10-16.
Region No String Common Params. This parameter is not required for this API.
LogsetId Yes String

log set id

Logset to which the query view belongs. It is only used to manage the query view. Topics contained in the query view can be irrelevant to this logset.

LogsetRegion Yes String

Region of the logset

Parameter format: ap-guangzhou

ViewName Yes String

View name

Input parameter limit: Supports up to 255 characters. Cannot contain "

ViewType Yes String

View type

Enumeration value:

  • log: Log topic
  • metric: Metric topic

The topic type in the field of Topics should match the ViewType.

Topics.N Yes Array of ViewSearchTopic

The query view contains topics, with a maximum of 10 topics.

The topic information configured in the Topics field should match the ViewType.

ViewIdPrefix No String

Custom query view id prefix

Parameter format: ^[a-z0-9][a-z0-9_-]{1,61}[a-z0-9]$

ViewId format of successfully created query view is ${ViewIdPrefix}-view

Description No String

Description

3. Output Parameters

Parameter Name Type Description
ViewId String

View ID

RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

4. Example

Example1 This API is used to create a query view.

Input Example

POST / HTTP/1.1
Host: cls.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateSearchView
<Common request parameters>

{
    "LogsetId": "b*******-diy-1254139626",
    "LogsetRegion": "ap-**************",
    "ViewName": "b*******_test_00001",
    "ViewType": "log",
    "Topics": [
        {
            "Region": "ap-guang*********",
            "LogsetId": "1dbef1b5-2559-45fd-b41f-272ebd5a4535",
            "TopicId": "b*******-diy-1254139626"
        }
    ],
    "ViewIdPrefix": "b*******_test_00001",
    "Description": "b*******-tag-key-value test"
}

Output Example

{
    "Response": {
        "ViewId": "b*******_test_00001-view",
        "RequestId": "550f786a-3943-43f0-a88e-1c3222bee72d"
    }
}

5. Developer Resources

SDK

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
AuthFailure CAM signature/authentication error.
FailedOperation Operation failed.
InternalError Internal error.
InvalidParameter Incorrect parameter.
InvalidParameterValue Incorrect parameter value.
MissingParameter Missing parameter.
OperationDenied Operation denied.
OperationDenied.ACLFailed ACL verification failed.
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.

Ajuda e Suporte

Esta página foi útil?

comentários