# Introduction

# Purpose

Miyabi contains certainm public and internal APIs. The public APIs are mostly used by clients(either via the ClientSDK or the CLI) to send and receieve information from Miyabi. The purpose of the API document is to provide details of the requests and responses of each API provided by Miyabi. It contains all the relevant information for each endpoint such as request and response bodies and parameters.

# Definitions of Input Parameters

Parameter ContentType Description Limit Comment
tableName string Name of a table N/A
key ByteString Byte string used as the key for table entries N/A
height signed int32 Number that shows a block's position in the chain min=0, max = max(int32)
blockHeight signed int32 The height that consensus is currently running at min=0, max = max(int32)
startHeight signed int32 The starting height used when designating a range of blocks min = 0, max = max(int32) If it is greater than the current height, an object not found error will be returned. If it is not defined, it will be calculated by depth from the current height.
depth signed int32 The maximum number of blocks to be retrieved min =0, max = (int32) Defaults to 10, if it is null.
id (Block ID) ByteString Each block has Unique Hexadecimal ID called block ID N/A
id (Transaction ID) ByteString Each transaction in the blockchain has a unique hexadecimal ID called transaction ID N/A Can be calculated through the CLI command GettransactionId using the transaction as an
transactionRequest TransactionRequest Entity containing details about the transaction(Transaction ID, Transaction entries etc) N/A

# Swagger

The APIs use swagger for API documentation with OAS, details of the API can be found at https://{host}/swagger/index.html.