Apache EventMesh Admin API

HTTP endpoints for managing the EventMesh runtime including topic management, subscription management, event publishing via HTTP, client monitoring, and runtime metrics.

OpenAPI Specification

eventmesh-admin.yml Raw ↑
openapi: 3.1.0
info:
  title: Apache EventMesh Admin API
  description: >-
    The Apache EventMesh Admin API provides HTTP endpoints for managing the
    EventMesh runtime, including topic management, subscription management,
    event publishing, and runtime monitoring. EventMesh supports CloudEvents
    specification for event formatting.
  version: 1.10.0
  contact:
    name: Apache EventMesh
    url: https://eventmesh.apache.org/
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
- url: http://localhost:10106
  description: Default EventMesh Admin HTTP endpoint
paths:
  /topic/create:
    post:
      summary: Apache EventMesh Create Topic
      operationId: createTopic
      tags:
      - Topic
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - topic
              properties:
                topic:
                  type: string
                  description: Topic name
      responses:
        '200':
          description: Topic created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /topic/delete:
    delete:
      summary: Apache EventMesh Delete Topic
      operationId: deleteTopic
      tags:
      - Topic
      parameters:
      - name: topic
        in: query
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Topic deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /topic/list:
    get:
      summary: Apache EventMesh List All Topics
      operationId: listTopics
      tags:
      - Topic
      responses:
        '200':
          description: List of topics
          content:
            application/json:
              schema:
                type: object
                properties:
                  retCode:
                    type: integer
                  retMsg:
                    type: string
                  data:
                    type: array
                    items:
                      type: string
  /subscription/query:
    get:
      summary: Apache EventMesh Query Subscriptions
      operationId: querySubscriptions
      tags:
      - Subscription
      responses:
        '200':
          description: List of subscriptions
          content:
            application/json:
              schema:
                type: object
                properties:
                  retCode:
                    type: integer
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Subscription'
  /client/query:
    get:
      summary: Apache EventMesh Query Connected Clients
      operationId: queryClients
      tags:
      - Client
      responses:
        '200':
          description: List of connected clients
          content:
            application/json:
              schema:
                type: object
                properties:
                  retCode:
                    type: integer
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Client'
  /event/publish:
    post:
      summary: Apache EventMesh Publish CloudEvent via HTTP
      operationId: publishEvent
      tags:
      - Event
      requestBody:
        required: true
        content:
          application/cloudevents+json:
            schema:
              $ref: '#/components/schemas/CloudEvent'
          application/json:
            schema:
              $ref: '#/components/schemas/CloudEvent'
      responses:
        '200':
          description: Event published
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /event/request:
    post:
      summary: Apache EventMesh Request-reply Event via HTTP
      operationId: requestEvent
      tags:
      - Event
      requestBody:
        required: true
        content:
          application/cloudevents+json:
            schema:
              $ref: '#/components/schemas/CloudEvent'
      responses:
        '200':
          description: Reply event
          content:
            application/cloudevents+json:
              schema:
                $ref: '#/components/schemas/CloudEvent'
  /registry/query:
    get:
      summary: Apache EventMesh Query Event Mesh Registry
      operationId: queryRegistry
      tags:
      - Registry
      responses:
        '200':
          description: Registry entries
          content:
            application/json:
              schema:
                type: object
  /metrics:
    get:
      summary: Apache EventMesh Get Runtime Metrics
      operationId: getMetrics
      tags:
      - Monitoring
      responses:
        '200':
          description: Runtime metrics
          content:
            application/json:
              schema:
                type: object
                properties:
                  retCode:
                    type: integer
                  data:
                    type: object
                    properties:
                      httpInMessageCount:
                        type: integer
                      httpOutMessageCount:
                        type: integer
                      tcpInMessageCount:
                        type: integer
                      tcpOutMessageCount:
                        type: integer
                      grpcInMessageCount:
                        type: integer
                      grpcOutMessageCount:
                        type: integer
  /configuration:
    get:
      summary: Apache EventMesh Get Runtime Configuration
      operationId: getConfiguration
      tags:
      - Monitoring
      responses:
        '200':
          description: Runtime configuration
          content:
            application/json:
              schema:
                type: object
components:
  schemas:
    ApiResponse:
      type: object
      properties:
        retCode:
          type: integer
          description: Return code (0 for success)
        retMsg:
          type: string
          description: Return message
    Subscription:
      type: object
      properties:
        topic:
          type: string
        url:
          type: string
        group:
          type: string
        protocol:
          type: string
    Client:
      type: object
      properties:
        env:
          type: string
        idc:
          type: string
        sys:
          type: string
        ip:
          type: string
        pid:
          type: string
        protocol:
          type: string
          enum: [HTTP, TCP, GRPC]
        group:
          type: string
        topics:
          type: array
          items:
            type: string
    CloudEvent:
      type: object
      description: A CloudEvents v1.0 compliant event
      required:
      - specversion
      - id
      - source
      - type
      properties:
        specversion:
          type: string
          const: "1.0"
          description: CloudEvents specification version
        id:
          type: string
          description: Unique event identifier
        source:
          type: string
          format: uri-reference
          description: Event source identifier
        type:
          type: string
          description: Event type
        datacontenttype:
          type: string
          description: Content type of the data attribute
        dataschema:
          type: string
          format: uri
          description: Schema for the data attribute
        subject:
          type: string
          description: Subject of the event in the context of the source
        time:
          type: string
          format: date-time
          description: Timestamp of the event
        data:
          description: Event payload
        data_base64:
          type: string
          format: byte
          description: Base64 encoded event payload