Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
Huawei Cloud Astro Canvas
Huawei Cloud Astro Zero
CodeArts Governance
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance (CCI)
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Cloud Transformation
Well-Architected Framework
Cloud Adoption Framework
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Blockchain
Blockchain Service
Web3 Node Engine Service
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ Log Tank Service/ API Reference/ APIs/ Log Stream Management/ Querying All Log Streams in a Specified Log Group

Querying All Log Streams in a Specified Log Group

Function

This API is used to query all log streams in a specified log group. You can obtain the details about these log streams and their log events, addressing various log management needs.

Calling Method

For details, see Calling APIs.

URI

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

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Parameter description:

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

Constraints:

N/A.

Value range:

N/A.

Default value:

N/A.

log_group_id

Yes

String

Parameter description:

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

Constraints:

N/A.

Value range:

N/A.

Default value:

N/A.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Parameter description:

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

Constraints:

N/A.

Value range:

N/A.

Default value:

N/A.

Content-Type

Yes

String

Parameter description:

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

Constraints:

N/A.

Value range:

N/A.

Default value:

N/A.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

log_streams

Array of LogStreamResBody objects

Parameter description:

Log streams.

Value range:

N/A.

Table 4 LogStreamResBody

Parameter

Type

Description

creation_time

Long

Parameter description:

Creation time.

Value range:

Minimum value: 1577808000000

Maximum value: 4102416000000

log_stream_id

String

Parameter description:

Log stream ID.

Value range:

N/A.

log_stream_name

String

Parameter description:

Log stream name.

Value range:

N/A.

log_stream_name_alias

String

Parameter description:

Log stream alias.

Value range:

N/A.

tag

Map<String,String>

Parameter description:

Log stream tags.

Value range:

N/A.

filter_count

Integer

Parameter description:

Number of filters.

Value range:

N/A.

is_favorite

Boolean

Parameter description:

Whether to add a log stream to favorites.

Value range:

N/A.

whether_log_storage

Boolean

Parameter description:

Whether to enable log storage.

Value range:

N/A.

hot_cold_separation

Boolean

Parameter description:

Whether to enable cold storage.

Value range:

N/A.

auth_web_tracking

Boolean

Parameter description:

Anonymous write switch.

Value range:

N/A.

ttl_in_days

Integer

Parameter description:

Log storage period.

Value range:

N/A.

hot_storage_days

Integer

Parameter description:

Standard storage period.

Value range:

N/A.

Status code: 401

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

Parameter description:

Error code.

Value range:

N/A.

error_msg

String

Parameter description:

Error message.

Value range:

N/A.

Status code: 403

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Parameter description:

Error code.

Value range:

N/A.

error_msg

String

Parameter description:

Error message.

Value range:

N/A.

Status code: 500

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Parameter description:

Error code.

Value range:

N/A.

error_msg

String

Parameter description:

Error message.

Value range:

N/A.

Example Requests

Query all log streams in a specified log group.

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

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

Example Responses

Status code: 200

The request is successful.

{
  "log_streams" : [ {
    "log_stream_name_alias" : "3",
    "creation_time" : 1723102152593,
    "auth_web_tracking" : false,
    "log_stream_name" : "3",
    "is_favorite" : false,
    "hot_storage_days" : -1,
    "tag" : {
      "_sys_enterprise_project_id" : "0"
    },
    "hot_cold_separation" : false,
    "filter_count" : 0,
    "log_stream_id" : "667293b4-7f6d-4efb-9b30-xxxxxxx",
    "ttl_in_days" : -1,
    "whether_log_storage" : true
  }, {
    "log_stream_name_alias" : "5",
    "creation_time" : 1723102172632,
    "auth_web_tracking" : false,
    "log_stream_name" : "5",
    "is_favorite" : false,
    "hot_storage_days" : -1,
    "tag" : {
      "_sys_enterprise_project_id" : "0"
    },
    "hot_cold_separation" : false,
    "filter_count" : 0,
    "log_stream_id" : "fb08a859-69ed-4bbe-9ba0-xxxxxxxx",
    "ttl_in_days" : -1,
    "whether_log_storage" : true
  } ]
}

Status code: 401

Authentication failed. Check the token and try again.

{
  "error_code" : "LTS.0003",
  "error_msg" : "Invalid token"
}

Status code: 403

Request rejected. The server has received the request and understood it, but refuses to respond to it. The client should not repeat the request without modifications.

{
  "error_code" : "LTS.0001",
  "error_msg" : "Invalid projectId"
}

Status code: 500

The server has received the request but encountered an internal error.

{
  "error_code" : "LTS.0010",
  "error_msg" : "The system encountered an internal error"
}

Status Codes

Status Code

Description

200

The request is successful.

401

Authentication failed. Check the token and try again.

403

Request rejected. The server has received the request and understood it, but refuses to respond to it. The client should not repeat the request without modifications.

500

The server has received the request but encountered an internal error.

Error Codes

See Error Codes.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback