Help Center/ Log Tank Service/ API Reference/ APIs/ Multi-Account Log Aggregation/ Obtaining the Log Groups and Log Streams of an Organization Member
Updated on 2024-01-16 GMT+08:00

Obtaining the Log Groups and Log Streams of an Organization Member

Function

This API can be called only by administrators or delegated administrators to obtain the log groups and log streams of an organization member.

Calling Method

For details, see Calling APIs.

URI

GET /v1/{project_id}/lts/{member_account_id}/all-streams

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.

member_account_id

Yes

String

Member account ID.

Request Parameters

Table 2 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 3 Response body parameters

Parameter

Type

Description

results

Array of results objects

Result of obtaining the log groups and log streams of an organization member

Table 4 results

Parameter

Type

Description

log_group_id

String

Log group ID.

log_group_name

String

Log group name.

log_streams

Array of log_streams objects

Log stream.

Table 5 log_streams

Parameter

Type

Description

log_stream_name

String

Log stream name.

log_stream_id

String

Log stream ID.

Status code: 400

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

Minimum: 8

Maximum: 36

error_msg

String

Error description.

Minimum: 2

Maximum: 512

Example Requests

GET https://{endpoint}/v1/{project_id}/lts/{member_account_id}/all-streams

/v1/{project_id}/lts/{member_account_id}/all-streams

Example Responses

Status code: 200

Log groups and log streams of an organization member

{
  "results" : [ {
    "log_group_name" : "cuiss",
    "log_streams" : [ {
      "log_stream_name" : "wjyTest",
      "log_stream_id" : "d67124ed-b4bd-4d89-8646-5905c2eeaa62"
    } ],
    "log_group_id" : "d6c04fe9-170a-4d98-94e6-7844f47bd0b8"
  } ]
}

Status Codes

Status Code

Description

200

Log groups and log streams of an organization member

400

Error response

Error Codes

See Error Codes.