Help Center/ Log Tank Service/ API Reference/ APIs/ Log Charts/ Querying a Log Stream Chart
Updated on 2025-11-14 GMT+08:00

Querying a Log Stream Chart

Function

This API is used to query a log flow chart.

Calling Method

For details, see Calling APIs.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.

  • If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, the following identity policy-based permissions are required.

    Action

    Access Level

    Resource Type (*: required)

    Condition Key

    Alias

    Dependencies

    lts:logStream:listChart

    List

    -

    -

    -

    -

URI

GET /v2/{project_id}/groups/{log_group_id}/streams/{log_stream_id}/charts

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details about how to obtain a project ID, see Obtaining the Project ID, Account ID, Log Group ID, and Log Stream ID.

Minimum: 32

Maximum: 32

log_group_id

Yes

String

Log group ID. For details about how to obtain a log group ID, see Obtaining the Project ID, Account ID, Log Group ID, and Log Stream ID.

Minimum: 36

Maximum: 36

log_stream_id

Yes

String

Log stream ID. For details about how to obtain a log stream ID, see Obtaining the Project ID, Account ID, Log Group ID, and Log Stream ID.

Minimum: 36

Maximum: 36

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

offset

No

Integer

Query cursor. Set the value to 0 in the first query. In subsequent queries, obtain the value from the response to the last request.

Minimum: 0

Maximum: 1024

limit

No

Integer

Number of records on each page. The maximum value is 100.

Minimum: 0

Maximum: 100

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

User token obtained from IAM. For details about how to obtain it, see Obtaining a User Token.

Constraints

N/A

Range

N/A

Default Value

N/A

Content-Type

Yes

String

Definition

Message body format. Set this parameter to application/json;charset=utf8.

Constraints

N/A

Range

N/A

Default Value

N/A

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

id

String

id

Minimum: 36

Maximum: 36

sql

String

SQL statement.

Minimum: 1

Maximum: 1024

title

String

Chart name.

Minimum: 1

Maximum: 64

type

String

Chart type.

Enumeration values:

  • table

  • bar

  • line

  • pie

  • number

log_group_id

String

Log group ID.

Minimum: 36

Maximum: 36

log_group_name

String

Log group name.

Minimum: 1

Maximum: 64

log_stream_id

String

Log group ID.

Minimum: 32

Maximum: 32

log_stream_name

String

Log stream name.

Minimum: 1

Maximum: 64

config

ChartConfig object

Chart configuration details.

Table 5 ChartConfig

Parameter

Type

Description

canSort

Boolean

Whether to enable sorting.

canSearch

Boolean

Whether to enable search.

pageSize

Integer

Number of records on each page.

Minimum: 0

Maximum: 100

Example Requests

Querying a log stream chart

GET https://{endpoint}/v2/{project_id}/groups/{log_group_id}/streams/{log_stream_id}/charts

/v2/{project_id}/groups/{log_group_id}/streams/{log_stream_id}/charts

Example Responses

Status code: 200

The request is successful.

{
  "id" : "string",
  "sql" : "string",
  "title" : "string",
  "type" : "table",
  "log_group_id" : "string",
  "log_group_name" : "string",
  "log_stream_id" : "string",
  "log_stream_name" : "string",
  "config" : {
    "canSort" : true,
    "canSearch" : true,
    "pageSize" : 0
  }
}

Status Codes

Status Code

Description

200

The request is successful.

Error Codes

See Error Codes.