Help Center/ GeminiDB/ API Reference/ APIs v3 (Recommended)/ Logs/ Querying LTS Log Configurations
Updated on 2025-09-04 GMT+08:00

Querying LTS Log Configurations

Function

This API is used to query the LTS configuration of instances.

Constraints

Slow query logs of the following instance types can be queried:

  • GeminiDB Redis

Audit logs of the following instance types can be queried:

  • GeminiDB Redis
  • GeminiDB Mongo

URI

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

Table 1 URI parameter

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. To obtain this value, see Obtaining a Project ID.

Table 2 Query parameters

Parameter

Mandatory

Type

Description

offset

No

Integer

Index offset. The query starts from the next piece of data indexed by this parameter. The value must be a non-negative number. The default value is 0, indicating that the query starts from the first piece of data.

limit

No

Integer

Maximum returned records. The value must be an integer ranging from 1 to 100. If this parameter is not transferred, information of 100 instances is queried by default.

instance_id

No

String

Instance ID used for exact search.

instance_name

No

String

Instance name used for fuzzy search.

enterprise_project_id

No

String

Enterprise project ID for exact search.

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token.

X-Language

No

String

Language.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

total_count

Integer

Total instance records.

instance_lts_configs

Array of objects

LTS log configurations of the instance. For details, see Table 5.

Table 5 InstanceLogConfig

Parameter

Type

Description

instance

object

Instance information. For details, see Table 6.

lts_configs

Array of objects

LTS log configuration details. If the LTS log stream is not configured, this parameter is not returned. For details, see Table 8.

Table 6 LogInstanceInfo

Parameter

Type

Description

id

String

Instance ID.

name

String

Instance name.

status

String

Instance status. The value can be:

  • normal: An instance is running normally.
  • abnormal: An instance is abnormal.
  • creating: An instance is being created.
  • frozen: An instance is frozen.
  • data_disk_full: An instance disk is full.
  • createfail: An instance failed to be created.
  • enlargefail: Instance nodes failed to be added.

mode

String

Instance type

  • RedisCluster: proxy cluster and Redis Cluster GeminiDB Redis instance with classic storage
  • CloudNativeCluster: GeminiDB Redis instance with cloud native storage
  • RedisReplication: primary/standby GeminiDB Redis instance
  • ReplicaSet: GeminiDB Mongo instance in a replica set

datastore

object

Database information. For details, see Table 7.

actions

Array of strings

Operation that is executed on the instance.

enterprise_project_id

String

Enterprise project ID.

supported_log_types

Array of strings

Supported log type. The value can be:

slow_log: slow query log

audit_log: audit log

Table 7 InstancesDatastoreResult

Parameter

Type

Description

type

String

DB API. Enumerated values:

  • mongodb: GeminiDB Mongo API
  • redis: GeminiDB Redis API

version

String

DB version number.

Table 8 InstanceLogConfigDetail

Parameter

Type

Description

log_type

String

Log type. The value can be:

  • slow_log: slow query log
  • audit_log: audit log

lts_group_id

String

ID of the LTS log group. If enabled is set to false, this parameter indicates the ID of the latest associated LTS log group.

lts_stream_id

String

ID of the LTS log stream. If enabled is set to false, this parameter indicates the ID of the latest associated LTS log stream.

enabled

Boolean

Whether LTS log stream is enabled.

  • true: enabled
  • false: disabled

Example Request

GET https://{Endpoint}/v3/0549b4a43100d4f32f51c01c2fe4acdb/instances/logs/lts-configs?limit=10&offset=0&instance_id=362b42f769ff45d884e1866f8ee00bb4in12&instance_name=c316&enterprise_project_id=0

Example Response

Status code: 200

Successful request

{ 
  "total_count" : 1, 
  "instance_lts_configs" : [ { 
    "instance" : { 
      "id" : "362b42f769ff45d884e1866f8ee00bb4in12", 
      "name" : "nosql-c316", 
      "mode" : "RedisCluster", 
      "datastore" : { 
        "version" : "5.0", 
        "type" : "redis" 
      }, 
      "status" : "normal", 
      "actions" : [ "GROWING" ], 
      "enterprise_project_id" : "0", 
      "supported_log_types" : [ "slow_log", "audit_log" ]
    }, 
    "lts_configs" : [ { 
      "log_type" : "slow_log", 
      "lts_group_id" : "65442dd4-b8de-4e9f-8a80-b60aa0698354", 
      "lts_stream_id" : "5992dd29-fd11-4228-a852-5f6e578789c5", 
      "enabled" : true 
    } ] 
  } ] 
}

Status Codes

For details, see Status Codes.

Error Codes

For details, see Error Codes.