Updated on 2026-09-02 GMT+08:00

Querying the Configuration File Content

Function

This API is used to query the content of a Logstash cluster configuration file, including the file name, status, content, and configuration details. You can use the configuration file to define a cluster migration plan and check whether the data sources and destinations are correct.

Calling Method

For details, see Calling APIs.

URI

GET /v1.0/{project_id}/clusters/{cluster_id}/lgsconf/confdetail

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID. For details about how to obtain the project ID and name, see Obtaining the Project ID and Name.

Constraints

N/A

Range

Project ID of an account. The value contains 32 characters, consisting of lowercase letters and digits.

Default Value

N/A

cluster_id

Yes

String

Definition

ID of the cluster to be queried. For details about how to obtain the cluster ID, see Obtaining the Cluster ID.

Constraints

N/A

Range

The value is a UUID containing 36 characters.

Default Value

N/A

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

name

Yes

String

Definition:

Configuration file name.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

Request Parameters

None

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

name

String

Definition:

Configuration file name.

Value range:

N/A

status

String

Definition:

Configuration file status.

Value range:

  • checking

  • available

  • unavailable

  • starting

  • working

  • stopping

  • stopped

  • restoring

confContent

String

Definition:

Configuration file content.

Value range:

N/A

setting

settingResponse object

Definition

Configuration content object.

updateAt

String

Definition

Update time, in the yyyy-MM-dd'T'HH:mm:ss format.

Range

N/A

desc

String

Definition

Configuration file description.

Range

Up to 128 characters.

sensitiveWordsShielding

Boolean

Definition

Whether to hide sensitive words.

Range

  • true: Sensitive words are hidden.

  • false: Sensitive words are not hidden.

Table 4 settingResponse

Parameter

Type

Description

workers

Integer

Definition

Number of worker threads that will execute the Filters and Outputs stages of the pipeline in parallel.

Range

N/A

batch_size

Integer

Definition

Maximum number of events collected from inputs by a single worker thread before executing its filters and outputs. Increasing this value increases memory overhead.

Range

1 to 100000

batch_delay_ms

Integer

Definition

Minimum waiting time of an event to be scheduled by the pipeline, in milliseconds.

Range

1-600000

queue_type

String

Definition

An internal queue for event buffering.

Range

  • memory: a traditional in-memory queue.

  • **persisted: a disk-based ACKed persistent queue.

queue_check_point_writes

Integer

Definition

Maximum number of written events before forcing a checkpoint when persistent queues are enabled.

Range

1 to 100000

queue_max_bytes_mb

Integer

Definition

Total capacity (in MB) of a persistent queue if persistent queues are used. Ensure that the disk capacity is greater than the value of this parameter.

Range

1-10240

Example Requests

Query the configuration file content.

GET https://{Endpoint}/v1.0/{project_id}/clusters/{cluster_id}/lgsconf/confdetail?name=conf1

Example Responses

Status code: 200

Request succeeded.

{
  "name" : "conf",
  "desc" : "This is a description of a configuration file.",
  "status" : "available",
  "confContent" : "input {\n    elasticsearch {\n        hosts => [\"xxx.xxx.xxx.xxx:9200\", \"xxx.xxx.xxx.xxx:9200\"]\n        index => \"xxx,xxx\"\n        docinfo => true\n    }\n}\nfilter {\n    mutate {\n        remove_field => [\"@timestamp\", \"@version\"]\n    }\n}\noutput {\n    elasticsearch {\n        hosts => [\"xxx.xxx.xxx.xxx:9200\", \"xxx.xxx.xxx.xxx:9200\"]\n        index => \"%{[@metadata][_index]}\"\n        document_id => \"%{[@metadata][_id]}\"\n        document_type => \"%{[@metadata][_type]}\"\n    }\n}",
  "setting" : {
    "workers" : 2
  },
  "updateAt" : "2021-09-29T02:44:44"
}

Status Codes

Status Code

Description

200

Request succeeded.

400

Invalid request.

The client should modify the request instead of re-initiating it.

409

The request cannot be processed due to a conflict.

This status code indicates that the resource that the client attempts to create already exits, or the requested update failed due to a conflict.

412

The server did not meet one of the preconditions contained in the request.

Error Codes

See Error Codes.