Help Center/ EventGrid/ API Reference/ APIs/ Connection Management/ Obtaining the Connection List
Updated on 2025-05-06 GMT+08:00

Obtaining the Connection List

Function

This API is used to obtain the list of connections.

URI

GET /v1/{project_id}/connections

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Tenant resource space ID.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

offset

No

Integer

Offset, which is the position where the query starts. The value must be greater than or equal to 0.

limit

No

Integer

Number of records displayed on each page. The value must be within the range [1, 1000].

sort

No

String

Sorting mode of the query results.

name

No

String

Name of the connection. It is used for exact match.

fuzzy_name

No

String

Name of the connection. It is used for fuzzy match.

instance_id

No

String

Queue instance ID of the connection.

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token. The token can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

total

Integer

Total number of records.

size

Integer

Number of records displayed on the current page.

items

Array of ConnectionInfo objects

Object list.

Table 5 ConnectionInfo

Parameter

Type

Description

id

String

ID of the event source.

name

String

Name of the connection. The value must be unique under a tenant. Only lowercase letters, digits, periods (.), underscores (_), and hyphens (-) are allowed. It must start with a letter or digit and cannot be default.

description

String

Description of the connection.

status

String

Status of the connection.

error_info

ErrorInfo object

Error message.

vpc_id

String

ID of the VPC to be connected.

subnet_id

String

ID of the subnet to be connected.

agency

String

Name of the user agency used by the target private network connection.

flavor

flavor object

Flavor.

type

String

Connection type, which can be webhook (HTTP connection) or kafka (Huawei Cloud Kafka instance).

kafka_detail

KafkaConnectionDetail object

Kafka connection parameters.

created_time

String

UTC time when the connection is created.

updated_time

String

UTC time when the connection is updated.

Table 6 ErrorInfo

Parameter

Type

Description

error_code

String

Error code.

error_detail

String

Error details.

error_msg

String

Error message.

Table 7 flavor

Parameter

Type

Description

name

String

Flavor name.

concurrency_type

String

Concurrent flavor type.

concurrency

Integer

Number of concurrent requests.

bandwidth_type

String

Bandwidth type.

Table 8 KafkaConnectionDetail

Parameter

Type

Description

instance_id

String

Kafka instance ID.

addr

String

Kafka connection address.

security_protocol

String

Security protocol.

enable_sasl_ssl

Boolean

Whether SASL_SSL is enabled for the Kafka instance.

user_name

String

Username of the Kafka instance. This parameter is mandatory when SASL_SSL is enabled for the instance.

password

String

Password of the Kafka instance. This parameter is mandatory when SASL_SSL is enabled for the instance.

acks

String

Number of acknowledgments that the producer requires the server to return before considering a request complete. This controls the durability of records that are sent. Supported options:

0: The producer will not wait for any acknowledgment from the server at all. The record will be immediately added to the socket buffer and considered sent. No guarantee can be made that the server has received the record, and the retries configuration will not take effect (as the client generally does not know of any failures). The offset given back for each record will always be set to -1.

1: The leader will write the record to its local log but will respond without waiting until receiving full acknowledgement from all followers. If the leader fails immediately after acknowledging the record but before the followers have replicated it, the record will be lost.

all: The leader will wait for the full set of replicas to acknowledge the record. This is the strongest available guarantee because the record will not be lost even if there is just one replica that works. min.insync.replicas specifies the minimum number of replicas that must acknowledge a write for the write to be considered successful.

Example Requests

Obtain the connection list.

GET https://{endpoint}/v1/{project_id}/connections

Example Responses

Status code: 200

Operation successful.

{
  "total" : 1,
  "size" : 1,
  "items" : [ { } ]
}

Status Codes

Status Code

Description

200

Operation successful.

Error Codes

See Error Codes.