List Connections
Overview
Retrieves all connections for a specific project. Secret fields (passwords, API keys, etc.) are masked and returned as null in list operations.
Endpoint
GET /apiops/projects/{projectName}/connections/
Authentication
Requires a Personal API Access Token.
Authorization: Bearer YOUR_TOKEN
Request
| Header |
Value |
Required |
| Authorization |
Bearer {token} |
Yes |
Path Parameters
| Parameter |
Type |
Required |
Description |
| projectName |
string |
Yes |
Project name |
Query Parameters
| Parameter |
Type |
Required |
Description |
| type |
string |
Yes |
Connection type. Valid values: email, kafka, elasticsearch, rabbitMq, ftp, graylog, syslog, webhook, logback, activeMq, snmp, linux-script, database, ldap |
Response
Success Response (200 OK)
{
"success": true,
"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
| Field |
Type |
Description |
| success |
boolean |
Indicates if the request was successful |
| resultList |
array |
List of connection objects |
| resultCount |
integer |
Total number of connections |
Connection Object Fields (Common)
| Field |
Type |
Description |
| type |
string |
Connection type discriminator field. Identifies the connection type in API responses. |
| name |
string |
Connection name |
| description |
string |
Connection description |
| deployToWorker |
boolean |
Whether to deploy to worker |
| enabled |
boolean |
Whether connection is enabled |
Note: Connection-specific fields vary by connection type. Secret fields are returned as null in list operations.
Error Response (401 Unauthorized)
{
"error": "unauthorized_client",
"error_description": "Invalid token"
}
Error Response (404 Not Found)
{
"error": "not_found",
"error_description": "Project 'MyProject' not found"
}
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.
Notes and Warnings
- Secret Fields: Secret fields (password, apiKey, etc.) are masked and returned as
null in list operations
- Get Single Connection: Use Get Connection to retrieve full connection details including secrets
- 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