Ceramic Peers API

The Peers API from Ceramic — 1 operation(s) for peers.

OpenAPI Specification

ceramic-peers-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 Peers API
  license:
    name: MIT
    url: https://mit-license.org/
servers:
- url: /ceramic
tags:
- name: Peers
paths:
  /peers:
    options:
      summary: cors
      parameters:
      - name: addresses
        in: query
        description: Multiaddress of peer to connect to, at least one address must contain the peer id.
        schema:
          type: array
          items:
            type: string
        required: true
      responses:
        '200':
          description: cors
      tags:
      - Peers
    get:
      summary: Get list of connected peers
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Peers'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      tags:
      - Peers
    post:
      summary: Connect to a peer
      parameters:
      - name: addresses
        in: query
        description: Multiaddress of peer to connect to, at least one address must contain the peer id.
        schema:
          type: array
          items:
            type: string
        required: true
      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:
      - Peers
components:
  schemas:
    Peers:
      title: List of Peers
      type: object
      required:
      - peers
      properties:
        peers:
          type: array
          items:
            schema: null
            $ref: '#/components/schemas/Peer'
    Peer:
      title: Information about a connected peer
      description: Information about a connected peer
      type: object
      required:
      - id
      - addresses
      properties:
        id:
          type: string
          description: DID of peer
        addresses:
          type: array
          description: List of known multiaddress of peer, will always include the peer id
          items:
            type: string
            description: Multiaddress where peer may be dialed
    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