Apache ActiveMQ Management API

Jolokia JMX-HTTP bridge for broker monitoring and management.

OpenAPI Specification

apache-activemq-management-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Apache ActiveMQ REST Management API
  description: The Apache ActiveMQ REST API provides HTTP-based access to messaging operations, allowing clients to produce and consume messages from queues and topics without a native JMS client. It also exposes a Jolokia JMX-HTTP bridge for broker management and monitoring.
  version: 6.2.4
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  contact:
    name: Apache ActiveMQ Community
    url: https://activemq.apache.org/support
  x-generated-from: documentation
  x-last-validated: '2026-04-19'
servers:
- url: http://localhost:8161/api
  description: Default local ActiveMQ broker API endpoint
tags:
- name: Management
  description: Jolokia JMX-HTTP bridge for broker monitoring and management.
paths:
  /jolokia/read/{mbean}:
    get:
      operationId: readMBeanAttribute
      summary: Apache ActiveMQ Read MBean Attribute via Jolokia
      description: Reads JMX MBean attributes using the Jolokia HTTP bridge. Provides access to broker metrics such as total consumer count, queue depths, message counts, and other operational data.
      tags:
      - Management
      parameters:
      - name: mbean
        in: path
        required: true
        description: JMX ObjectName of the MBean to read, e.g., org.apache.activemq:type=Broker,brokerName=localhost
        schema:
          type: string
          example: org.apache.activemq:type=Broker,brokerName=localhost
      - name: attribute
        in: path
        required: false
        description: Optional attribute name to read from the MBean. If omitted, all attributes are returned.
        schema:
          type: string
          example: TotalConsumerCount
      - name: Origin
        in: header
        required: true
        description: Origin header required by Jolokia CORS protection.
        schema:
          type: string
          example: http://localhost
      responses:
        '200':
          description: MBean attribute(s) returned successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JolokiaResponse'
              examples:
                ReadMBeanAttribute200Example:
                  summary: Default readMBeanAttribute 200 response
                  x-microcks-default: true
                  value:
                    request:
                      type: read
                      mbean: org.apache.activemq:type=Broker,brokerName=localhost
                      attribute: TotalConsumerCount
                    value: 3
                    timestamp: 1718153645
                    status: 200
        '401':
          description: Authentication required.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JolokiaError'
        '404':
          description: MBean or attribute not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JolokiaError'
      security:
      - basicAuth: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas:
    JolokiaResponse:
      title: JolokiaResponse
      description: Standard Jolokia response envelope for successful MBean read operations.
      type: object
      properties:
        request:
          type: object
          description: Echo of the original request details.
          properties:
            type:
              type: string
              description: Jolokia operation type (read, write, exec, search).
              example: read
            mbean:
              type: string
              description: JMX ObjectName of the target MBean.
              example: org.apache.activemq:type=Broker,brokerName=localhost
            attribute:
              type: string
              description: Attribute name that was read.
              example: TotalConsumerCount
        value:
          description: The attribute value returned. Type varies by attribute.
          example: 3
        timestamp:
          type: integer
          description: Unix timestamp of the response.
          example: 1718153645
        status:
          type: integer
          description: HTTP status code of the Jolokia operation.
          example: 200
    JolokiaError:
      title: JolokiaError
      description: Jolokia error response envelope.
      type: object
      properties:
        error_type:
          type: string
          description: Error class name.
          example: java.lang.IllegalArgumentException
        error:
          type: string
          description: Error message.
          example: No MBean found for pattern
        status:
          type: integer
          description: HTTP status code.
          example: 404
        timestamp:
          type: integer
          description: Unix timestamp of the error response.
          example: 1718153645
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: HTTP Basic authentication using broker credentials. Default credentials are admin/admin but should be changed in production via jetty-realm.properties.