Algorand common API

The common API from Algorand — 6 operation(s) for common.

OpenAPI Specification

algorand-common-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  contact:
    email: contact@algorand.com
    name: algorand
    url: https://www.algorand.com/get-in-touch/contact
  description: API endpoint for algod operations.
  title: Algod REST API. common API
  version: 0.0.1
servers:
- url: http://localhost/
- url: https://localhost/
security:
- api_key: []
tags:
- name: common
paths:
  /genesis:
    get:
      description: Returns the entire genesis file in json.
      operationId: GetGenesis
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Genesis'
          description: The genesis file in json.
        default:
          content: {}
          description: Unknown Error
      summary: Gets the genesis information.
      tags:
      - common
  /health:
    get:
      operationId: HealthCheck
      responses:
        '200':
          content: {}
          description: OK.
        default:
          content: {}
          description: Unknown Error
      summary: Returns OK if healthy.
      tags:
      - common
  /metrics:
    get:
      operationId: Metrics
      responses:
        '200':
          content: {}
          description: text with \#-comments and key:value lines
        '404':
          content: {}
          description: metrics were compiled out
      summary: Return metrics about algod functioning.
      tags:
      - common
  /ready:
    get:
      operationId: GetReady
      responses:
        '200':
          content: {}
          description: OK.
        '500':
          content: {}
          description: Internal Error
        '503':
          content: {}
          description: Node not ready yet
        default:
          content: {}
          description: Unknown Error
      summary: Returns OK if healthy and fully caught up.
      tags:
      - common
  /swagger.json:
    get:
      description: Returns the entire swagger spec in json.
      operationId: SwaggerJSON
      responses:
        '200':
          content:
            application/json:
              schema:
                type: string
          description: The current swagger spec
        default:
          content: {}
          description: Unknown Error
      summary: Gets the current swagger spec.
      tags:
      - common
  /versions:
    get:
      description: Retrieves the supported API versions, binary build versions, and genesis information.
      operationId: GetVersion
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Version'
          description: VersionsResponse is the response to 'GET /versions'
      tags:
      - common
components:
  schemas:
    Genesis:
      properties:
        alloc:
          items:
            $ref: '#/components/schemas/GenesisAllocation'
          type: array
        comment:
          type: string
        devmode:
          type: boolean
        fees:
          type: string
        id:
          type: string
        network:
          type: string
        proto:
          type: string
        rwd:
          type: string
        timestamp:
          format: int64
          type: integer
      required:
      - alloc
      - fees
      - id
      - network
      - proto
      - rwd
      - timestamp
      title: Genesis File in JSON
      type: object
    BuildVersion:
      properties:
        branch:
          type: string
        build_number:
          type: integer
        channel:
          type: string
        commit_hash:
          type: string
        major:
          type: integer
        minor:
          type: integer
      required:
      - branch
      - build_number
      - channel
      - commit_hash
      - major
      - minor
      title: BuildVersion contains the current algod build version information.
      type: object
    GenesisAllocation:
      properties:
        addr:
          type: string
        comment:
          type: string
        state:
          properties:
            algo:
              format: uint64
              type: integer
            onl:
              type: integer
            sel:
              type: string
            stprf:
              type: string
            vote:
              type: string
            voteFst:
              format: uint64
              type: integer
            voteKD:
              format: uint64
              type: integer
            voteLst:
              format: uint64
              type: integer
          required:
          - algo
          - onl
          type: object
      required:
      - addr
      - comment
      - state
      title: Allocations for Genesis File
      type: object
    Version:
      description: algod version information.
      properties:
        build:
          $ref: '#/components/schemas/BuildVersion'
        genesis_hash_b64:
          format: byte
          pattern: ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$
          type: string
        genesis_id:
          type: string
        versions:
          items:
            type: string
          type: array
      required:
      - build
      - genesis_hash_b64
      - genesis_id
      - versions
      title: Version contains the current algod version.
      type: object
  securitySchemes:
    api_key:
      description: Generated header parameter. This token can be generated using the Goal command line tool. Example value ='b7e384d0317b8050ce45900a94a1931e28540e1f69b2d242b424659c341b4697'
      in: header
      name: X-Algo-API-Token
      type: apiKey
x-original-swagger-version: '2.0'