Ana içeriğe atla

Endpoint

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

Authentication

Requires a Personal API Access Token.
Authorization: Bearer YOUR_TOKEN

Request

Headers

HeaderValueRequired
AuthorizationBearer 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)

{
  "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": "[email protected]",
      "password": null,
      "enableStartTls": true,
      "auth": true,
      "defaultEncoding": "UTF-8",
      "from": "[email protected]"
    },
    {
      "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
successbooleanIndicates if the request was successful
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)

{
  "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.

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
  • 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