Updated on 2026-01-08 GMT+08:00

Querying LTS Log Configurations

API Description

This API is used to query LTS log configurations.

Restrictions

This API is available only for audit logs.

URI

  • URI format

    GET https://{Endpoint}/v3/{project_id}/instances/logs/lts-configs

  • URI example

    Table 1 Path parameters

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    String

    Project ID of a tenant in a region. To obtain the project ID, see Obtaining a Project ID.

    Table 2 Query parameters

    Name

    Mandatory

    Type

    Description

    offset

    No

    Integer

    Index offset. If offset is set to N, the resource query starts from the N+1 piece of data. The default value is 0, indicating that the query starts from the first piece of data. The value must be a positive integer.

    limit

    No

    Integer

    Number of records to be queried. The value ranges from 0 to 50. If this parameter is not transferred, the log configurations of the first 50 DB instances are queried by default.

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token

  • Example request

    None

Response Parameters

Table 4 Response body parameters

Parameter

Type

Description

instance_lts_configs

Array of Table 5 objects

LTS log configuration and brief information about each instance.

total_count

Integer

Total number of cloud service log configurations that can be queried, which is equal to the total number of DDS instances.

Table 5 instance_lts_configs

Parameter

Type

Description

instance

Table 6 object

Brief information about an instance.

lts_configs

Array of Table lts_configs objects

LTS log configuration details. If no LTS log stream is configured, no response is returned for this field.

Table 6 instance

Parameter

Type

Description

id

String

Instance ID.

name

String

Instance name.

mode

String

Instance type, which can be replica set or cluster.

Enumerated values:

  • Replica
  • Sharding

datastore

Table 7 object

DB engine and version of the DB instance.

status

String

Instance status.

enterprise_project_id

String

ID of the enterprise project to which the instance belongs. For the default enterprise project, the value is 0. For other enterprise projects, see Enterprise Management User Guide.

actions

Array of strings

All actions that are being executed on an instance.

Table 7 datastore

Parameter

Type

Description

type

String

DB engine. The value is mongodb.

Enumerated values:

  • mongodb

version

String

Database major version.

Table 8 lts_configs

Parameter

Type

Description

log_type

String

LTS log type. This parameter cannot be left empty. The options are as follows:

  • audit_log

Enumerated values:

  • audit_log

lts_group_id

String

LTS log group ID.

lts_stream_id

String

LTS log stream ID.

enabled

Boolean

Indicates whether to upload logs to LTS.

  • Example response
    { 
      "total_count" : 1, 
      "instance_lts_configs" : [ { 
        "instance" : { 
          "id" : "520c58ba00a3497e97ce0b9604874dd6in02", 
          "name" : "dds-1f84", 
          "mode" : "replica", 
          "datastore" : { 
            "type" : "mongodb", 
            "version" : 4.0 
          }, 
          "status" : "normal", 
          "enterprise_project_id" : "0", 
          "actions" : [ "OPS_AUDIT_LOG" ] 
        }, 
        "lts_configs" : [ { 
          "log_type" : "audit_log", 
          "lts_group_id" : "ec6dc499-1a63-4229-a0c2-a2afa8bcfc95", 
          "lts_stream_id" : "cae69d2e-378b-41dd-b3c9-3ca1cd5335bc", 
          "enabled" : true 
        } ] 
      } ] 
    }

Status Code

For details, see Status Code.

Error Code

For details, see Error Code.