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

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.

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.

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.

limit

No

Integer

Number of records on each page. The maximum value is 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.

Content-Type

Yes

String

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

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

id

String

id

sql

String

SQL statement.

title

String

Chart name.

type

String

Chart type.

log_group_id

String

Log group ID.

log_group_name

String

Log group name.

log_stream_id

String

Log group ID.

log_stream_name

String

Log stream name.

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.

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.