Help Center/ SecMaster/ API Reference/ SecMaster APIs (V1)/ Cloud Service Access/ Obtaining Cloud Service Log Collection Configuration
Updated on 2025-12-18 GMT+08:00

Obtaining Cloud Service Log Collection Configuration

Function

This API is used to obtain cloud service log collection configuration.

Calling Method

For details, see Calling APIs.

URI

GET /v1/{project_id}/collector/cloudlogs/config

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID, which is used to specify the project that a resource belongs to. You can query the resources of a project by project ID. You can obtain the project ID from the API or console. Obtaining the Project ID

Constraints

N/A

Value Range

N/A

Default value

N/A

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

region_id

No

String

Region ID.

offset

No

Long

Page number.

limit

No

Long

Number of records on each page.

sort_key

No

String

Sorting field.

sort_dir

No

String

Sorting order.

csvc

No

String

Cloud service.

domain_id

Yes

String

Account ID.

query_statistics

No

Boolean

Whether to query cloud service access metrics. The default value is True.

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

User token. You can obtain it by calling the IAM API for obtaining a user token. The user token is the value of X-Subject-Token in the response header. Obtaining a User Token

Constraints

N/A

Range

N/A

Default Value

N/A

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

all_vendors

Array of all_vendors objects

All cloud vendors, cloud products, and logs.

cofing_statistics

cofing_statistics object

Statistics.

data_list

Array of data_list objects

Data.

datasets

Array of DatasetInfo objects

Dataset list.

dataspace_id

String

Data space ID.

dataspace_name

String

Data space name.

domain_id

String

Account ID.

lts_sets

Array of LtsResponseVo objects

LTS log configuration.

project_id

String

Project ID.

region_id

String

Region.

workspace_id

String

Workspace ID.

Table 5 all_vendors

Parameter

Type

Description

cloud_vendor

String

Cloud vendor ID.

csvc_list

Array of csvc_list objects

All cloud products.

Table 6 csvc_list

Parameter

Type

Description

csvc

String

Cloud product ID.

source_list

Array of source_list objects

All log types.

Table 7 source_list

Parameter

Type

Description

csvc_display

String

Cloud product name.

csvc_hzzelp

String

Cloud product description.

link

String

URL.

source_display

String

Log name.

source_help

String

Log description.

Table 8 cofing_statistics

Parameter

Type

Description

account_num

Number

Number of integrated accounts.

daily_traffic

Number

Daily traffic, in bytes.

log_num

Number

Volume of integrated logs.

product_all_num

Number

Total number of cloud products.

product_in_num

Number

Number of integrated cloud products.

vendor_num

Number

Number of cloud vendors.

Table 9 data_list

Parameter

Type

Description

account_all_num

Number

Total number of integrated accounts.

account_successful_num

Number

Number of successfully integrated accounts.

csvc

String

Cloud product ID.

datasets

Array of datasets objects

Log data.

last_modified_time

Number

Last update time.

log_all_num

Number

Total number of logs.

log_in_num

Number

Number of access logs.

log_in_num_last_one_hour

Number

Number of access quantity in the last hour.

process_status

String

Status.

vendor

String

Cloud vendor ID.

Table 10 datasets

Parameter

Type

Description

account_all_num

Number

Total number of integrated accounts.

account_successful_num

Number

Number of successfully integrated accounts.

accounts

Array of accounts objects

Account list.

alert

Boolean

Auto alert conversion.

all_accounts

Boolean

Whether to access all managed accounts.

allow_alert

Boolean

Whether to enable auto alert conversion.

dataspace_id

String

Data space ID.

dataspace_name

String

Data space name.

enable

String

Status.

last_active_time

Number

Last active time.

limit

String

Constraints

new_account_auto_access

Boolean

Auto integration for new accounts.

process_status

String

Log access status. The value can be FAIL, DEFAULT, CREATING, or SUCCESS. FAIL: access failed. DEFAULT: pending access. CREATING: being accessed. SUCCESS: access succeeded.

reference

reference object

Name and description.

region_id

String

Region.

sink_msg

String

Error message.

source_id

Number

Log ID.

source_name

String

Log name.

target

target object

Target.

type

String

Type.

workspace_id

String

Workspace ID.

Table 11 accounts

Parameter

Type

Description

account_id

String

Account ID.

last_log_date

Number

Last access time.

log_count

String

Integration quantity in the last hour.

name

String

Account name.

process_status

String

Access status.

sink_msg

String

Error message.

Table 12 reference

Parameter

Type

Description

csvc_display

String

Cloud product name.

csvc_hzzelp

String

Cloud product description.

link

String

URL.

source_display

String

Log name.

source_help

String

Log description.

Table 13 target

Parameter

Type

Description

pipe

String

Pipeline.

shards

Number

Shard.

storage_mode

String

Storage mode.

ttl

Number

TTL time.

Table 14 DatasetInfo

Parameter

Type

Description

csvc

String

Cloud service to which the data source belongs. For example, enter hss for server security.

enable

String

Status. 0: disabled; 1: enabled.

is_region

Long

Location information. 1: region; 0: global.

reference

reference object

Data source name.

source_id

Long

Data source ID.

source_name

String

Data source name.

target

Object

Destination pipeline information.

type

Long

Subscription type. 1: tenant subscription; 2: tenant industry monitoring subscription; 3: platform industry monitoring subscription. Currently, the value is 1.

Table 15 reference

Parameter

Type

Description

csvc_display

String

Cloud service description.

source_display

String

Data source description.

link

String

URL.

csvc_help

String

Cloud service help.

source_help

String

Data source help.

Table 16 TargetInfo

Parameter

Type

Description

pipe

String

Pipeline name.

shards

Long

Number of required partitions.

ttl

Long

Data lifecycle.

Table 17 LtsResponseVo

Parameter

Type

Description

config_id

String

Configuration ID.

config_name

String

Configuration name.

enable

String

Whether to enable.

log_group_id

String

Log group ID.

log_stream_id

String

Log stream ID.

log_type

String

Log type.

log_types

log_types object

List of log types.

lts_infos

Array of lts_infos objects

LTS log information map.

pipe_alias

String

Pipeline alias.

type_prefix

String

Type prefix.

Table 18 log_types

Parameter

Type

Description

secm_lts_

Array of strings

Type prefix.

Table 19 lts_infos

Parameter

Type

Description

log_group_id

String

Log group ID.

log_group_name

String

Group name.

streams

Array of streams objects

Stream list.

Table 20 streams

Parameter

Type

Description

log_stream_id

String

Log stream ID.

log_stream_name

String

Log stream name.

Status code: 400

Table 21 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Example Requests

None

Example Responses

Status code: 200

Successful.

{
  "all_vendors" : [ {
    "cloud_vendor" : "SYSTEM",
    "csvc_list" : [ {
      "csvc" : "hss",
      "source_list" : [ {
        "csvc_display" : "HSS alerts.",
        "csvc_hzzelp" : "HSS server alerts.",
        "link" : "hss.com",
        "source_display" : "HSS",
        "source_help" : "Host Security Service (HSS)"
      } ]
    } ]
  } ],
  "cofing_statistics" : {
    "account_num" : 100,
    "daily_traffic" : 1024,
    "log_num" : 10,
    "product_all_num" : 8,
    "product_in_num" : 4,
    "vendor_num" : 2
  },
  "data_list" : [ {
    "account_all_num" : 100,
    "account_successful_num" : 30,
    "csvc" : "HSS",
    "datasets" : [ {
      "account_all_num" : 20,
      "account_successful_num" : 10,
      "accounts" : [ {
        "account_id" : "dd723a1e-43b4-4964-943c-e43fd1d1bef3",
        "last_log_date" : 1748355708341,
        "log_count" : 20,
        "name" : "h30043642",
        "process_status" : "FAIL",
        "sink_msg" : "Failed to access"
      } ],
      "alert" : true,
      "all_accounts" : true,
      "allow_alert" : true,
      "enable" : "ACTIVE",
      "last_active_time" : 1748355708341,
      "new_account_auto_access" : true,
      "process_status" : "FAIL",
      "region_id" : "cn-north-7",
      "sink_msg" : "Failed to access",
      "source_id" : 101,
      "source_name" : "hss-alarm",
      "target" : {
        "pipe" : "_sec_waf_access",
        "shards" : 1,
        "ttl" : 180
      },
      "workspace_id" : "dd723a1e-43b4-4964-943c-e43fd1d1bef3"
    } ],
    "last_modified_time" : 1748355708341,
    "log_all_num" : 20,
    "log_in_num" : 30,
    "log_in_num_last_one_hour" : 10000,
    "process_status" : "SUCCESS",
    "vendor" : "SYSTEM"
  } ],
  "datasets" : [ {
    "csvc" : "hss",
    "enable" : 1,
    "is_region" : 1,
    "reference" : {
      "csvc_display" : "Server security.",
      "csvc_help" : "Host Security Service (HSS) checks your assets and protects them from harm you may or may not have noticed, including intrusions, vulnerabilities, and unsafe settings.",
      "link" : "cloud.com/xxx",
      "source_display" : "HSS alarms.",
      "source_help" : "HSS alarms."
    },
    "source_id" : 27,
    "source_name" : "hss_alarm",
    "target" : {
      "pipe" : "_sec_hss_alarm",
      "shards" : 1,
      "ttl" : 180
    },
    "type" : 1
  }, {
    "csvc" : "waf",
    "enable" : 1,
    "is_region" : 0,
    "reference" : {
      "csvc_display" : "Web Application Firewall (WAF)",
      "csvc_help" : "Web Application Firewall (WAF) examines all HTTP and HTTPS requests to detect and block attacks such as Structured Query Language (SQL) injections, cross-site scripting (XSS) attacks, web shells, command and code injections, file inclusion, sensitive file access, third-party application vulnerability exploits, Challenge Collapsar (CC) attacks, malicious crawlers, and cross-site request forgery (CSRF), in order to ensure web service security and stability.",
      "link" : "cloud.com/xxx",
      "source_display" : "WAF access logs",
      "source_help" : "WAF access logs."
    },
    "source_id" : 28,
    "source_name" : "waf_access",
    "target" : {
      "pipe" : "_sec_waf_access",
      "shards" : 1,
      "ttl" : 180
    },
    "type" : 1
  } ],
  "dataspace_id" : "a00106ba-bede-453c-8488-b60c70bd6aed",
  "dataspace_name" : "cloudlogs_2b31ed520xxxxxxebedb6e57xxxxxxxx",
  "domain_id" : "0531ed520xxxxxxebedb6e57xxxxxxxx",
  "lts_sets" : [ {
    "config_name" : "Test cloud service logs.",
    "enable" : "ACTIVE",
    "log_group_id" : "d5c78cea-7c53-467e-b17e-344f2370b8e9",
    "log_stream_id" : "xxxx-cce5-46xxx89-8b8a-90d269f7db76",
    "log_type" : "apig",
    "log_types" : {
      "secm_lts_" : [ "apig" ]
    },
    "lts_infos" : [ {
      "log_group_id" : "d5c78cea-7c53-467e-b17e-344f2370b8e9",
      "log_group_name" : "aom-090-002",
      "streams" : [ {
        "log_stream_id" : "xxxx-cce5-46xxx89-8b8a-90d269f7db76",
        "log_stream_name" : "lts-xxxx-lmytest-0522-12"
      }, {
        "log_stream_id" : "7cdc28ce-xxxx-4f4b-9247-6edd42808f8a",
        "log_stream_name" : "lts-topic-test001002"
      } ]
    }, {
      "log_group_id" : "dd723a1e-43b4-4964-943c-e43fd1d1bef3",
      "log_group_name" : "lts-group-lmytest-0522-2",
      "streams" : [ {
        "log_stream_id" : "xxxx-cce5-46xxx89-8b8a-90d269f7db76",
        "log_stream_name" : "lts-xxxx-lmytest-0522-12"
      }, {
        "log_stream_id" : "7cdc28ce-xxxx-4f4b-9247-6edd42808f8a",
        "log_stream_name" : "lts-topic-test001002"
      } ]
    } ],
    "pipe_alias" : "Test.",
    "type_prefix" : "secm_lts_"
  } ],
  "project_id" : "2b31ed520xxxxxxebedb6e57xxxxxxxx",
  "region_id" : "cn-north-4",
  "workspace_id" : "c22106ba-bede-453c-8488-b60c70bd6aed"
}

Status Codes

Status Code

Description

200

Successful.

400

Error response.

Error Codes

See Error Codes.