Ceramic Events API

The Events API from Ceramic — 2 operation(s) for events.

OpenAPI Specification

ceramic-events-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  description: 'This is the Ceramic API for working with streams and events

    '
  version: 0.58.0
  title: Ceramic Config Events API
  license:
    name: MIT
    url: https://mit-license.org/
servers:
- url: /ceramic
tags:
- name: Events
paths:
  /events:
    options:
      summary: cors
      responses:
        '200':
          description: cors
      tags:
      - Events
    post:
      summary: Creates a new event
      requestBody:
        $ref: '#/components/requestBodies/EventData'
      responses:
        '204':
          description: success
        '400':
          description: bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      tags:
      - Events
  /events/{event_id}:
    options:
      summary: cors
      parameters:
      - name: event_id
        in: path
        required: true
        description: Name of the field in the Events header that holds the separator value e.g. 'model'
        schema:
          type: string
      responses:
        '200':
          description: cors
      tags:
      - Events
    get:
      summary: Get event data
      parameters:
      - name: event_id
        in: path
        description: CID of the root block of the event, used to identify of the event
        schema:
          type: string
        required: true
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Event'
        '400':
          description: bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponse'
        '404':
          description: Event not found
          content:
            text/plain:
              schema:
                type: string
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      tags:
      - Events
components:
  requestBodies:
    EventData:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/EventData'
      description: Event to add to the node
      required: true
  schemas:
    EventData:
      title: A Ceramic Event Data Payload
      description: The data for a Ceramic event that is part of a Ceramic Stream
      type: object
      required:
      - data
      properties:
        data:
          type: string
          description: Multibase encoding of event data.
    BadRequestResponse:
      title: Response to a bad request (400)
      description: Bad request (input error)
      type: object
      required:
      - message
      properties:
        message:
          type: string
          description: Message describing the error
    ErrorResponse:
      title: Error response
      description: Error response
      type: object
      required:
      - message
      properties:
        message:
          type: string
          description: Error message
    Event:
      title: A Ceramic Event
      description: A Ceramic event as part of a Ceramic Stream. Contains both the root CID used to identify the Event as well as the Event payload data.
      type: object
      required:
      - id
      properties:
        id:
          type: string
          description: Multibase encoding of event root CID bytes.
        data:
          type: string
          description: Multibase encoding of event data.