Ceramic Interests API

The Interests API from Ceramic — 2 operation(s) for interests.

OpenAPI Specification

ceramic-interests-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 Interests API
  license:
    name: MIT
    url: https://mit-license.org/
servers:
- url: /ceramic
tags:
- name: Interests
paths:
  /interests/{sort_key}/{sort_value}:
    options:
      summary: cors
      parameters:
      - name: sort_key
        in: path
        description: Name of the field in the Events header that holds the separator value e.g. 'model'
        schema:
          type: string
        required: true
      - name: sort_value
        in: path
        description: The value of the field in the Events header indicated by the separator key e.g. multibase encoded model ID
        schema:
          type: string
        required: true
      responses:
        '200':
          description: cors
      tags:
      - Interests
    post:
      summary: Register interest for a sort key
      parameters:
      - name: sort_key
        in: path
        description: name of the sort_key
        schema:
          type: string
        required: true
      - name: sort_value
        in: path
        description: value associated with the sort key
        schema:
          type: string
        required: true
      - name: controller
        in: query
        description: the controller to register interest for
        required: false
        schema:
          type: string
      - name: streamId
        in: query
        description: the stream to register interest for
        required: false
        schema:
          type: string
      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:
      - Interests
  /interests:
    options:
      summary: cors
      responses:
        '200':
          description: cors
      tags:
      - Interests
    post:
      summary: Register interest for a sort key
      requestBody:
        $ref: '#/components/requestBodies/Interest'
      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:
      - Interests
components:
  requestBodies:
    Interest:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Interest'
      description: Interest to register on the node
      required: true
  schemas:
    Interest:
      title: A recon interest
      description: Describes a recon interest range to store and synchronize
      type: object
      required:
      - sep
      - sepValue
      properties:
        sep:
          type: string
          description: Separator key, typically 'model' (sometimes called sort_key)
        sepValue:
          type: string
          description: Multibase encoded separator value (sometimes called sort_value, typically a stream ID)
        controller:
          type: string
          description: Decentralized identifier (DID) string
        streamId:
          type: string
          description: Multibase encoded stream ID.
    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