Eventuate Subscriptions API

The Subscriptions API from Eventuate — 4 operation(s) for subscriptions.

OpenAPI Specification

eventuate-subscriptions-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Eventuate REST Entities Subscriptions API
  description: The Eventuate REST API provides HTTP endpoints for managing aggregates, events, subscriptions, and event-sourced entities in the Eventuate platform for distributed data management in microservices.
  version: 1.0.0
  contact:
    name: Eventuate
    url: https://eventuate.io/
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
- url: '{baseUrl}'
  description: Eventuate Server
  variables:
    baseUrl:
      default: http://localhost:8080
tags:
- name: Subscriptions
paths:
  /subscriptions:
    post:
      operationId: createSubscription
      summary: Create an event subscription
      description: Creates a new subscription to receive events for specified entity types.
      tags:
      - Subscriptions
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSubscriptionRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Subscription'
  /subscriptions/{subscriptionId}:
    get:
      operationId: getSubscription
      summary: Get a subscription
      description: Returns details of a specific event subscription.
      tags:
      - Subscriptions
      parameters:
      - name: subscriptionId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Subscription'
    delete:
      operationId: deleteSubscription
      summary: Delete a subscription
      description: Deletes an event subscription.
      tags:
      - Subscriptions
      parameters:
      - name: subscriptionId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Subscription deleted
  /subscriptions/{subscriptionId}/events:
    get:
      operationId: getSubscriptionEvents
      summary: Get events from a subscription
      description: Retrieves pending events for a subscription.
      tags:
      - Subscriptions
      parameters:
      - name: subscriptionId
        in: path
        required: true
        schema:
          type: string
      - name: maxEvents
        in: query
        schema:
          type: integer
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SubscriptionEvent'
  /subscriptions/{subscriptionId}/acknowledge:
    post:
      operationId: acknowledgeEvents
      summary: Acknowledge events
      description: Acknowledges receipt and processing of subscription events.
      tags:
      - Subscriptions
      parameters:
      - name: subscriptionId
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                eventIds:
                  type: array
                  items:
                    type: string
      responses:
        '200':
          description: Events acknowledged
components:
  schemas:
    Subscription:
      type: object
      properties:
        subscriptionId:
          type: string
        subscriberId:
          type: string
        entityTypesAndEvents:
          type: object
    SubscriptionEvent:
      type: object
      properties:
        id:
          type: string
        eventType:
          type: string
        eventData:
          type: string
        entityId:
          type: string
        entityType:
          type: string
        swimlane:
          type: string
        offset:
          type: integer
          format: int64
    CreateSubscriptionRequest:
      type: object
      required:
      - subscriberId
      - entityTypesAndEvents
      properties:
        subscriberId:
          type: string
        entityTypesAndEvents:
          type: object
          additionalProperties:
            type: array
            items:
              type: string