# General API

The general APIs are used to get node, block & transaction information and also, to write transaction to Miyabi blockchain ledger.

URL Method Description
/blocks/id/{id} GET Return the block information for a given block id.
/blocks/height/{blockHeight} GET Return the block information at a given block height.
/blockevents/id/{id} GET Return the block events for a given block id.
/blockevents/height/{height} GET Return the events for the block at a given block height.
/headers
QueryParams startHeight, depth
GET Return the block header and consensus evidence information for a given set of blocks, which are arranged in decreasing order according to their block height.
/blocklimit
QueryParams height
GET Return the information of the maximum permitted transaction size and maximum transaction entries allowed per transaction at a given block height.
/blockchainparameters
QueryParams height
GET Return the information of the blockchain related parameters at a particular height or latest height.
/blocks
QueryParams startHeight, depth
GET Return the information from a given set of blocks, which are arranged in decreasing order according to its block height.
/consensus/credentials
QueryParams height
GET Return a list of the consensus members credentials at the current height (default) or given height.
/consensus/peers GET Return a list of the consensus peers that are connected to this node. The credentials of the current node will not be included in the list.
/headers/id/{id} GET Return the block header and consensus evidence for a given block Id.
/headers/height/{blockHeight} GET Return the block header and consensus evidence at a given block height.
/height GET Return the blockchain's current height stored by the node.
/history/{tableName}/{key}
QueryParams startHeight
GET Return a list containing the transaction Ids that have modified a given key in a table. The table should have Tracked enabled.
/history/{tableName}/{key}/detail
QueryParams startHeight
GET Return a list containing the transaction details of the transactions that have modified a given key in a table. The table should have Tracked enabled.
/mempool/count GET Return the number of pending transactions currently stored in the memory pool of the node.
/getinfo GET Return general information on the current node.
/iscore GET Return true or false depending on whether the node is a core one.
/peers GET Return the list of public keys of the peers the node is currently connected to.
/peercount GET Return the number of peers the node is currently connected to.
/performance GET Return the performance statistics on the node.
/stateproof/{tableName}/{entryKey} GET Return a proof for the given entry key and table. The proof of existence is a bundle of hashes to prove the value hash of the specified item belongs to the Merkle tree of the root hash.
/tables
QueryParams searchString, limit
GET Return a list of table descriptors of all the existing tables. Each table descriptor can have its own set of fields as per the type of descriptor.
/tx/{id} GET Return the transaction information for a given transaction Id.
/txlist/{height} GET Return a set of transactions contained in the block at the specific height.
/tx/result/{id} GET Return the result of a previously submitted transaction for a given transaction Id.
/txresults POST Return the result of previously submitted transactions for a given transaction Id list.
/txs POST Return the transaction information for a given list of transaction Ids.
/sendtx POST Submit a transaction to Miyabi. It must contain the transaction information in the request body. The value returned is the integral validation check of the transaction, not the actual result of it.
/sendtxs POST Submit multiple transactions to Miyabi. The value returned is the integral validation check of the transactions, not the actual result of them.