REST API

The Hyperledger Explorer REST API provides endpoints to retrieve information, and metrics about the Hyperledger Fabric blockchain, such as blocks, transactions, nodes, chaincodes, channels, peers, and other information.

The REST API is designed to be used in the Node.js JavaScript runtime, and uses built-in middleware function in Express to parse incoming requests with JSON payloads and is based on body-parser.

Security on the Hyperledger Explorer REST API is enforced with a token. All requests made to the REST API must have a token that is generated by the API.

Overview

The REST API list of features include:
  • Authorization routes
    • Login
    • Network list
  • Platform routes
    • Transactions by organization(s)
    • Channel info
    • Channel list
    • Current channel
    • Change channel
    • Block by number
    • Peer status
  • Database routes
    • Blocks counts
    • Block list
    • Transactions counts
    • Transaction list
    • Transaction information
    • Block and transaction list
    • Chaincode list
    • Peer list
    • Transactions per minute
    • Transactions per hour(s)
    • Blocks per minute
    • Blocks per hour(s)

Routes

There are three main routes defined, authorization, database, and platform.


Swagger

To learn more about REST API, and use an interactive API console to submit requests you can take advantage of the SWAGGER provided by the Hyperledger Explorer.

Hyperledger Explorer SWAGGER home page.