Ana içeriğe geç

List Connections

Endpoint​

GET /apiops/projects/{projectName}/connections/

Authentication​

Requires a Personal API Access Token.

Authorization: Bearer YOUR_TOKEN

Request​

Headers​

HeaderValueRequired
AuthorizationBearer {token}Yes

Path Parameters​

ParameterTypeRequiredDescription
projectNamestringYesProject name

Query Parameters​

ParameterTypeRequiredDescription
typestringYesConnection type. Valid values: email, kafka, elasticsearch, rabbitMq, ftp, graylog, syslog, webhook, logback, activeMq, snmp, linux-script, database, ldap

Response​

Success Response (200 OK)​

{
"status": "SUCCESS",
"resultList": [
{
"type": "email",
"name": "my-email-connection",
"description": "Email connection for notifications",
"deployToWorker": true,
"enabled": true,
"host": "smtp.example.com",
"port": 587,
"username": "user@example.com",
"password": null,
"enableStartTls": true,
"auth": true,
"defaultEncoding": "UTF-8",
"from": "noreply@example.com"
},
{
"type": "kafka",
"name": "my-kafka-connection",
"description": "Kafka connection for event streaming",
"deployToWorker": true,
"enabled": true,
"topicName": "events",
"keyStoreName": "my-keystore",
"trustStoreName": "my-truststore"
}
],
"resultCount": 2
}

Response Fields​

FieldTypeDescription
statusstringResponse status: SUCCESS or FAILURE
resultListarrayList of connection objects
resultCountintegerTotal number of connections

Connection Object Fields (Common)​

FieldTypeDescription
typestringConnection type discriminator field. Identifies the connection type in API responses.
namestringConnection name
descriptionstringConnection description
deployToWorkerbooleanWhether to deploy to worker
enabledbooleanWhether connection is enabled

Note: Connection-specific fields vary by connection type. Secret fields are returned as null in list operations.

Error Response (401 Unauthorized)​

{
"status": "FAILURE",
"resultMessage": "Token is not valid!"
}

Error Response (400 Bad Request)​

{
"status": "FAILURE",
"resultMessage": "Connection type parameter is required!"
}

Common Causes​

  • Missing required type query parameter
  • Invalid connection type value
  • Project not found or insufficient access

cURL Examples​

List Connections by Type (Database)​

curl -X GET \
"https://demo.apinizer.com/apiops/projects/MyProject/connections/?type=database" \
-H "Authorization: Bearer YOUR_TOKEN"

List Connections by Type (Email)​

curl -X GET \
"https://demo.apinizer.com/apiops/projects/MyProject/connections/?type=email" \
-H "Authorization: Bearer YOUR_TOKEN"

List Connections by Type (Kafka)​

curl -X GET \
"https://demo.apinizer.com/apiops/projects/MyProject/connections/?type=kafka" \
-H "Authorization: Bearer YOUR_TOKEN"

Full JSON Body Example​

This endpoint does not require a request body.

Permissions​

  • User must have any permission in the project (read access)

Notes and Warnings​

  • Secret Fields: Secret fields (password, apiKey, etc.) are masked and returned as null in list operations and in Get Connection alike; secrets are write-only through the API
  • Get Single Connection: Use Get Connection to retrieve the full non-secret configuration of one connection
  • Connection Types: Each connection type has different fields. See individual connection type documentation for details
  • Type Parameter Required: The type query parameter is required. Since connections are stored in separate collections by type, you must specify the connection type to query
  • Valid Type Values: email, kafka, elasticsearch, rabbitMq, ftp, graylog, syslog, webhook, logback, activeMq, snmp, linux-script, database, ldap