Ana içeriğe atla

General Information

Connection Type

rabbitMq

UI Documentation

Endpoints

List Connections

GET /apiops/projects/{projectName}/connections/?type=rabbitMq

Get Connection

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

Create Connection

POST /apiops/projects/{projectName}/connections/{connectionName}/

Update Connection

PUT /apiops/projects/{projectName}/connections/{connectionName}/

Delete Connection

DELETE /apiops/projects/{projectName}/connections/{connectionName}/

List Connections

Endpoint

GET /apiops/projects/{projectName}/connections/?type=rabbitMq

Request

Headers

HeaderValue
AuthorizationBearer

Path Parameters

ParameterTypeRequiredDescription
projectNamestringYesProject name
Note: The type query parameter is required to filter connections by type.

cURL Example

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

Get Connection

Endpoint

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

Request

Headers

HeaderValue
AuthorizationBearer

Path Parameters

ParameterTypeRequiredDescription
projectNamestringYesProject name
connectionNamestringYesConnection name

Response

Success Response (200 OK)

{
  "success": true,
  "resultList": [
    {
      "type": "rabbitMq",
      "name": "my-rabbitmq-connection",
      "description": "RabbitMQ connection for messaging",
      "deployToWorker": true,
      "enabled": true,
      "hostPortList": [
        {
          "host": "rabbitmq.example.com",
          "port": 5672
        },
        {
          "host": "rabbitmq2.example.com",
          "port": 5672
        }
      ],
      "connectionFactoryVirtualHost": "/",
      "authenticationEnabled": true,
      "connectionFactoryUsername": "guest",
      "connectionFactoryPassword": null,
      "connectionFactoryConnectionTimeout": 60000,
      "connectionFactoryClientProperties": {
        "clientName": "apinizer-client"
      },
      "connectionFactoryRequestedChannelMax": 2047,
      "connectionFactoryRequestedFrameMax": 0,
      "connectionFactoryRequestedHeartbeat": 60,
      "connectionFactoryUseSslProtocol": true,
      "connectionFactorySslProtocol": "TLSv1.2",
      "channelExchange": "my-exchange",
      "channelRoutingKey": "my-routing-key",
      "basicPropertiesAppId": "apinizer",
      "basicPropertiesContentType": "application/json",
      "basicPropertiesContentEncoding": "UTF-8",
      "basicPropertiesDeliveryMode": 2,
      "basicPropertiesPriority": 0,
      "basicPropertiesReplyTo": null,
      "basicPropertiesExpiration": null,
      "basicPropertiesType": "event",
      "basicPropertiesUserId": null,
      "basicPropertiesClusterId": null
    }
  ],
  "resultCount": 1
}
Note: Password is masked in get operations.

cURL Example

curl -X GET \
  "https://demo.apinizer.com/apiops/projects/MyProject/connections/my-rabbitmq-connection/" \
  -H "Authorization: Bearer YOUR_TOKEN"

Create Connection

Endpoint

POST /apiops/projects/{projectName}/connections/{connectionName}/

Request

Headers

HeaderValue
AuthorizationBearer
Content-Typeapplication/json

Path Parameters

ParameterTypeRequiredDescription
projectNamestringYesProject name
connectionNamestringYesConnection name

Request Body

Full JSON Body Example - Basic Configuration
{
  "type": "rabbitMq",
  "name": "my-rabbitmq-connection",
  "description": "RabbitMQ connection for messaging",
  "deployToWorker": true,
  "enabled": true,
  "hostPortList": [
    {
      "host": "localhost",
      "port": 5672
    }
  ],
  "connectionFactoryVirtualHost": "/",
  "authenticationEnabled": false,
  "connectionFactoryUsername": null,
  "connectionFactoryPassword": null,
  "connectionFactoryConnectionTimeout": 60000,
  "connectionFactoryClientProperties": null,
  "connectionFactoryRequestedChannelMax": 2047,
  "connectionFactoryRequestedFrameMax": 0,
  "connectionFactoryRequestedHeartbeat": 60,
  "connectionFactoryUseSslProtocol": false,
  "connectionFactorySslProtocol": "TLSv1.2",
  "channelExchange": "",
  "channelRoutingKey": "<queue-name>",
  "basicPropertiesAppId": "apinizer",
  "basicPropertiesContentType": "application/json",
  "basicPropertiesContentEncoding": null,
  "basicPropertiesDeliveryMode": null,
  "basicPropertiesPriority": null,
  "basicPropertiesReplyTo": null,
  "basicPropertiesExpiration": null,
  "basicPropertiesType": null,
  "basicPropertiesUserId": null,
  "basicPropertiesClusterId": null
}
Full JSON Body Example - With Authentication
{
  "type": "rabbitMq",
  "name": "my-rabbitmq-connection",
  "description": "RabbitMQ connection with authentication",
  "deployToWorker": true,
  "enabled": true,
  "hostPortList": [
    {
      "host": "rabbitmq.example.com",
      "port": 5672
    }
  ],
  "connectionFactoryVirtualHost": "/",
  "authenticationEnabled": true,
  "connectionFactoryUsername": "guest",
  "connectionFactoryPassword": "guest",
  "connectionFactoryConnectionTimeout": 60000,
  "connectionFactoryClientProperties": {
    "clientName": "apinizer-client",
    "version": "1.0"
  },
  "connectionFactoryRequestedChannelMax": 2047,
  "connectionFactoryRequestedFrameMax": 0,
  "connectionFactoryRequestedHeartbeat": 60,
  "connectionFactoryUseSslProtocol": false,
  "connectionFactorySslProtocol": "TLSv1.2",
  "channelExchange": "my-exchange",
  "channelRoutingKey": "my-routing-key",
  "basicPropertiesAppId": "apinizer",
  "basicPropertiesContentType": "application/json",
  "basicPropertiesContentEncoding": "UTF-8",
  "basicPropertiesDeliveryMode": 2,
  "basicPropertiesPriority": 0,
  "basicPropertiesReplyTo": null,
  "basicPropertiesExpiration": null,
  "basicPropertiesType": "event",
  "basicPropertiesUserId": null,
  "basicPropertiesClusterId": null
}
Full JSON Body Example - With SSL
{
  "type": "rabbitMq",
  "name": "my-rabbitmq-connection",
  "description": "RabbitMQ connection with SSL",
  "deployToWorker": true,
  "enabled": true,
  "hostPortList": [
    {
      "host": "rabbitmq.example.com",
      "port": 5671
    }
  ],
  "connectionFactoryVirtualHost": "/",
  "authenticationEnabled": true,
  "connectionFactoryUsername": "guest",
  "connectionFactoryPassword": "guest",
  "connectionFactoryConnectionTimeout": 60000,
  "connectionFactoryClientProperties": null,
  "connectionFactoryRequestedChannelMax": 2047,
  "connectionFactoryRequestedFrameMax": 0,
  "connectionFactoryRequestedHeartbeat": 60,
  "connectionFactoryUseSslProtocol": true,
  "connectionFactorySslProtocol": "TLSv1.2",
  "channelExchange": "my-exchange",
  "channelRoutingKey": "my-routing-key",
  "basicPropertiesAppId": "apinizer",
  "basicPropertiesContentType": "application/json",
  "basicPropertiesContentEncoding": null,
  "basicPropertiesDeliveryMode": 2,
  "basicPropertiesPriority": null,
  "basicPropertiesReplyTo": null,
  "basicPropertiesExpiration": null,
  "basicPropertiesType": null,
  "basicPropertiesUserId": null,
  "basicPropertiesClusterId": null
}
Full JSON Body Example - High Availability
{
  "type": "rabbitMq",
  "name": "my-rabbitmq-connection",
  "description": "RabbitMQ connection with multiple hosts",
  "deployToWorker": true,
  "enabled": true,
  "hostPortList": [
    {
      "host": "rabbitmq1.example.com",
      "port": 5672
    },
    {
      "host": "rabbitmq2.example.com",
      "port": 5672
    },
    {
      "host": "rabbitmq3.example.com",
      "port": 5672
    }
  ],
  "connectionFactoryVirtualHost": "/",
  "authenticationEnabled": true,
  "connectionFactoryUsername": "guest",
  "connectionFactoryPassword": "guest",
  "connectionFactoryConnectionTimeout": 60000,
  "connectionFactoryRequestedChannelMax": 2047,
  "connectionFactoryRequestedFrameMax": 0,
  "connectionFactoryRequestedHeartbeat": 60,
  "connectionFactoryUseSslProtocol": false,
  "connectionFactorySslProtocol": "TLSv1.2",
  "channelExchange": "my-exchange",
  "channelRoutingKey": "my-routing-key",
  "basicPropertiesAppId": "apinizer",
  "basicPropertiesContentType": "application/json"
}
Request Body Fields
Common Fields
FieldTypeRequiredDefaultDescription
typestringYes-Connection type discriminator field. Identifies the connection type in API requests/responses.
namestringYes-Connection name (must match path parameter)
descriptionstringNo-Connection description
deployToWorkerbooleanNotrueWhether to deploy to worker
enabledbooleanNotrueWhether connection is enabled
RabbitMQ-Specific Fields
FieldTypeRequiredDefaultDescription
hostPortListarrayYes-List of RabbitMQ host/port pairs. See ConfigRabbitMqHostPort
connectionFactoryVirtualHoststringNo/Virtual host name
authenticationEnabledbooleanNofalseEnable authentication
connectionFactoryUsernamestringNo*nullRabbitMQ username (required if authenticationEnabled=true)
connectionFactoryPasswordstringNo*nullRabbitMQ password (required if authenticationEnabled=true, secret field)
connectionFactoryConnectionTimeoutintegerNo60000Connection timeout in milliseconds
connectionFactoryClientPropertiesobjectNonullClient properties map (key-value pairs)
connectionFactoryRequestedChannelMaxintegerNo2047Requested channel maximum
connectionFactoryRequestedFrameMaxintegerNo0Requested frame maximum (0 = unlimited)
connectionFactoryRequestedHeartbeatintegerNo60Requested heartbeat interval in seconds
connectionFactoryUseSslProtocolbooleanNofalseUse SSL/TLS protocol
connectionFactorySslProtocolstringNoTLSv1.2SSL protocol version (e.g., “TLSv1.2”, “TLSv1.3”)
channelExchangestringNo""Exchange name (empty string for default exchange)
channelRoutingKeystringNo-Routing key pattern (e.g., “my-queue”, “order.created”)
basicPropertiesAppIdstringNoapinizerApplication ID for message properties
basicPropertiesContentTypestringNoapplication/jsonContent type for message properties
basicPropertiesContentEncodingstringNonullContent encoding for message properties
basicPropertiesDeliveryModeintegerNonullDelivery mode: 1 (non-persistent) or 2 (persistent)
basicPropertiesPriorityintegerNonullMessage priority (0-255)
basicPropertiesReplyTostringNonullReply-to queue name
basicPropertiesExpirationstringNonullMessage expiration time (milliseconds as string)
basicPropertiesTypestringNonullMessage type
basicPropertiesUserIdstringNonullUser ID for message properties
basicPropertiesClusterIdstringNonullCluster ID for message properties

Note

  • hostPortList must contain at least one host/port pair.
  • If authenticationEnabled: true, both connectionFactoryUsername and connectionFactoryPassword are required.
  • connectionFactoryVirtualHost defaults to ”/” (root virtual host).
  • channelExchange can be empty string for default exchange.
  • basicPropertiesDeliveryMode: 1 = non-persistent, 2 = persistent (recommended for reliability).

ConfigRabbitMqHostPort

FieldTypeRequiredDefaultDescription
hoststringYeslocalhostRabbitMQ broker hostname or IP address
portintegerNo5672RabbitMQ broker port (5672 for AMQP, 5671 for AMQPS)
Note: At least one host/port pair is required in hostPortList. Multiple hosts can be specified for high availability.

Response

Success Response (200 OK)

{
  "success": true,
  "deploymentResult": {
    "success": true,
    "deploymentResults": [
      {
        "environmentName": "production",
        "success": true,
        "message": "Deployment successful"
      }
    ]
  }
}

cURL Example

curl -X POST \
  "https://demo.apinizer.com/apiops/projects/MyProject/connections/my-rabbitmq-connection/" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "rabbitMq",
    "name": "my-rabbitmq-connection",
    "description": "RabbitMQ connection for messaging",
    "deployToWorker": true,
    "enabled": true,
    "hostPortList": [
      {
        "host": "localhost",
        "port": 5672
      }
    ],
    "connectionFactoryVirtualHost": "/",
    "authenticationEnabled": false,
    "connectionFactoryUseSslProtocol": false,
    "channelExchange": "",
    "channelRoutingKey": "<queue-name>",
    "basicPropertiesAppId": "apinizer",
    "basicPropertiesContentType": "application/json"
  }'

Update Connection

Endpoint

PUT /apiops/projects/{projectName}/connections/{connectionName}/

Request

Headers

HeaderValue
AuthorizationBearer
Content-Typeapplication/json

Path Parameters

ParameterTypeRequiredDescription
projectNamestringYesProject name
connectionNamestringYesConnection name (must match name in body)

Request Body

Full JSON Body Example
{
  "type": "rabbitMq",
  "name": "my-rabbitmq-connection",
  "description": "Updated RabbitMQ connection for messaging",
  "deployToWorker": true,
  "enabled": true,
  "hostPortList": [
    {
      "host": "rabbitmq.example.com",
      "port": 5672
    },
    {
      "host": "rabbitmq-backup.example.com",
      "port": 5672
    }
  ],
  "connectionFactoryVirtualHost": "/production",
  "authenticationEnabled": true,
  "connectionFactoryUsername": "apinizer_user",
  "connectionFactoryPassword": "secure_password",
  "connectionFactoryConnectionTimeout": 30000,
  "connectionFactoryClientProperties": {
    "application": "Apinizer",
    "version": "1.0"
  },
  "connectionFactoryRequestedChannelMax": 2047,
  "connectionFactoryRequestedFrameMax": 131072,
  "connectionFactoryRequestedHeartbeat": 60,
  "connectionFactoryUseSslProtocol": true,
  "connectionFactorySslProtocol": "TLSv1.3",
  "channelExchange": "apinizer.exchange",
  "channelRoutingKey": "apinizer.queue",
  "basicPropertiesAppId": "apinizer-prod",
  "basicPropertiesContentType": "application/json",
  "basicPropertiesContentEncoding": "UTF-8",
  "basicPropertiesDeliveryMode": 2,
  "basicPropertiesPriority": 5,
  "basicPropertiesReplyTo": "apinizer.reply.queue",
  "basicPropertiesExpiration": "60000",
  "basicPropertiesType": "request",
  "basicPropertiesUserId": "apinizer_user",
  "basicPropertiesClusterId": null
}
Note: Request body structure is the same as Create Connection. All fields should be provided for update.

Response

Success Response (200 OK)

{
  "success": true,
  "deploymentResult": {
    "success": true,
    "deploymentResults": [...]
  }
}

Delete Connection

Endpoint

DELETE /apiops/projects/{projectName}/connections/{connectionName}/

Request

Headers

HeaderValue
AuthorizationBearer

Path Parameters

ParameterTypeRequiredDescription
projectNamestringYesProject name
connectionNamestringYesConnection name

Response

Success Response (200 OK)

{
  "success": true,
  "deploymentResult": {
    "success": true,
    "deploymentResults": [...]
  }
}

Notes and Warnings

  • RabbitMQ Hosts:
    • At least one host is required in hostPortList
    • Multiple hosts can be specified for high availability
    • Each host must have host and port
    • Default port: 5672 (AMQP), 5671 (AMQPS)
  • Virtual Host:
    • connectionFactoryVirtualHost defaults to ”/” (root virtual host)
    • Virtual hosts provide logical separation in RabbitMQ
  • Authentication:
    • When authenticationEnabled: true, both connectionFactoryUsername and connectionFactoryPassword are required
    • Default credentials: guest/guest (change in production)
    • Password is stored securely and masked in responses
  • SSL/TLS:
    • connectionFactoryUseSslProtocol: true enables SSL/TLS
    • connectionFactorySslProtocol specifies protocol version (TLSv1.2, TLSv1.3)
    • Use port 5671 for AMQPS
  • Connection Settings:
    • connectionFactoryConnectionTimeout - Connection timeout in milliseconds
    • connectionFactoryRequestedChannelMax - Maximum channels per connection
    • connectionFactoryRequestedFrameMax - Maximum frame size (0 = unlimited)
    • connectionFactoryRequestedHeartbeat - Heartbeat interval in seconds (keeps connection alive)
  • Channel Settings:
    • channelExchange - Exchange name (empty for default exchange)
    • channelRoutingKey - Routing key pattern
    • Default exchange routes messages directly to queues by routing key
  • Message Properties:
    • basicPropertiesAppId - Application identifier
    • basicPropertiesContentType - Message content type (e.g., “application/json”)
    • basicPropertiesContentEncoding - Content encoding (e.g., “UTF-8”)
    • basicPropertiesDeliveryMode - 1 (non-persistent) or 2 (persistent)
    • basicPropertiesPriority - Message priority (0-255)
    • basicPropertiesExpiration - Message TTL in milliseconds (as string)
    • basicPropertiesType - Message type identifier
    • basicPropertiesReplyTo - Reply-to queue name
    • basicPropertiesUserId - User ID
    • basicPropertiesClusterId - Cluster ID
  • Delivery Mode:
    • 1 - Non-persistent (messages lost on broker restart)
    • 2 - Persistent (messages survive broker restart, recommended)
  • Performance:
    • Heartbeat keeps connections alive
    • Connection pooling improves performance
    • Multiple hosts provide high availability
  • Security:
    • Use authentication in production
    • Use SSL/TLS for encrypted communication
    • Change default credentials
  • Deployment: Connection changes require deployment to take effect. Set deployToWorker: true or deploy manually.