Help Center/ Log Tank Service/ API Reference/ APIs/ Log Charts/ Querying a Log Stream Chart
Updated on 2024-12-20 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.

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

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

Minimum: 1000

Maximum: 2000

Content-Type

Yes

String

Set this parameter to application/json;charset=UTF-8.

Minimum: 30

Maximum: 30

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.

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.