Sei

Sei Unsafe API

Unsafe APIs

OpenAPI Specification

sei-unsafe-api-openapi.yml Raw ↑
swagger: '2.0'
info:
  title: HTTP API Console ABCI Unsafe API
  name: ''
  description: ABCI APIs
tags:
- name: Unsafe
  description: Unsafe APIs
paths:
  /dial_seeds:
    get:
      summary: Dial Seeds (Unsafe)
      operationId: dial_seeds
      tags:
      - Unsafe
      description: "Dial a peer, this route in under unsafe, and has to manually enabled to use\n\n  **Example:** curl 'localhost:26657/dial_seeds?seeds=\\[\"f9baeaa15fedf5e1ef7448dd60f46c01f1a9e9c4@1.2.3.4:26656\",\"0491d373a8e0fcf1023aaf18c51d6a1d0d4f31bd@5.6.7.8:26656\"\\]'\n"
      parameters:
      - in: query
        name: peers
        description: list of seed nodes to dial
        schema:
          type: array
          items:
            type: string
            example: f9baeaa15fedf5e1ef7448dd60f46c01f1a9e9c4@1.2.3.4:26656
      responses:
        '200':
          description: Dialing seeds in progress. See /net_info for details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/dialResp'
        '500':
          description: empty error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /dial_peers:
    get:
      summary: Add Peers/Persistent Peers (unsafe)
      operationId: dial_peers
      tags:
      - Unsafe
      description: 'Set a persistent peer, this route in under unsafe, and has to manually enabled to use.


        **Example:** curl ''localhost:26657/dial_peers?peers=\["f9baeaa15fedf5e1ef7448dd60f46c01f1a9e9c4@1.2.3.4:26656","0491d373a8e0fcf1023aaf18c51d6a1d0d4f31bd@5.6.7.8:26656"\]&persistent=false''

        '
      parameters:
      - in: query
        name: persistent
        description: Have the peers you are dialing be persistent
        schema:
          type: boolean
          example: true
      - in: query
        name: unconditional
        description: Have the peers you are dialing be unconditional
        schema:
          type: boolean
          example: true
      - in: query
        name: private
        description: Have the peers you are dialing be private
        schema:
          type: boolean
          example: true
      - in: query
        name: peers
        description: array of peers to dial
        schema:
          type: array
          items:
            type: string
            example: f9baeaa15fedf5e1ef7448dd60f46c01f1a9e9c4@1.2.3.4:26656
      responses:
        '200':
          description: Dialing seeds in progress. See /net_info for details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/dialResp'
        '500':
          description: empty error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /unsafe_flush_mempool:
    get:
      summary: Flush mempool of all unconfirmed transactions
      operationId: unsafe_flush_mempool
      tags:
      - Unsafe
      description: 'Flush flushes out the mempool. It acquires a read-lock, fetches all the

        transactions currently in the transaction store and removes each transaction

        from the store and all indexes and finally resets the cache.


        Note, flushing the mempool may leave the mempool in an inconsistent state.

        '
      responses:
        '200':
          description: empty answer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmptyResponse'
        '500':
          description: empty error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    dialResp:
      type: object
      properties:
        Log:
          type: string
          example: Dialing seeds in progress. See /net_info for details
    EmptyResponse:
      description: Empty Response
      allOf:
      - $ref: '#/components/schemas/JSONRPC'
      - type: object
        properties:
          result:
            type: object
            additionalProperties: {}
    JSONRPC:
      type: object
      properties:
        id:
          type: integer
          example: 0
        jsonrpc:
          type: string
          example: '2.0'
    ErrorResponse:
      description: Error Response
      allOf:
      - $ref: '#/components/schemas/JSONRPC'
      - type: object
        properties:
          error:
            type: string
            example: Description of failure