# Module API

Each module in Miyabi provides additional endpoints. To verify if a module is correctly loaded, swagger has a list of all the supported API.

# Binary API

Name Description
Get Binary Table Return the entire content from a binary table.
URL /binary/table/{tableName}
Get Binary Value Return the value of an entry from a binary table.
URL /binary/value/{tableName}/{key}

# Asset API

Name Description
Get Asset Return the balance amount as decimal for a given address.
URL /asset/value/{tableName}/{Address}
Get Asset Table Return the list of asset addresses and balances from a particular table.
URL /asset/table/{tableName}

# Entity API

Name Description
Get Entity Return the entity relationships for a given entity from the entity table. For reading the entity value, the user needs to present the required credentials which have read permissions. The presented credentials should be in accordance with the current table read permission owners, row owners and the respective permission model of the table.
URL /entity/value/{tableName}/{key}
Get Entity Table Return the entire content from a given entity table. Only those rows will be returned for which the presented credentials can satisfy the read operation permissions.
URL /entity/table/{tableName}
Get Entity Tree Return the entity relationship tree for a given entity from the entity table. Each child will return the full information of the entry to form a hierarchical structure. It can be filtered by depth.
URL /entity/tree/{tableName}/{key}

# Contract API

Name Description
Get Analyzer Parameters Return the Allowed Assemblies which are whitelisted for use in smart contracts, and also, returns the lists of Allowed and Forbidden Members. Members represent a data model or a namespace. Only the Allowed Libraries and Allowed Members can be used in smart contracts.
URL /contract/analyzer/parameters
Get Deployed Contract Return a list of all deployed contracts' assemblies.
URL /contract/assemblies
Get Instances Return a list of the instantiated contracts.
URL /contract/instances
Query Method Query a method in a deployed smart contract. This is a 'read-only' operation and will not change any state on the blockchain. The result of the method will be returned as a JSON string.
URL /contract/query/{asmId}/{contractName}/{instanceName}/
{methodName}

# NFT API

Name Description
Get Balance of Owner Return the number of tokens owned by a given address.
URL /NFT/value/{tableName}/{address}/balance
Get NFT Table Return the entire content from a given NFT table.
URL /NFT/table/{tableName}
Get Owner of NFT Return the owner address of a specific NFT token.
URL /NFT/value/{tableName}/{tokenId}/owner

# Private Data API

Name Description
Get Private Data Return hash private data entry from a given table and key.
URL /PrivateDataHash/value/{tableName}/{key}
Get Private Data Table Return all hash private data entries from a given private data table.
URL /PrivateDataHash/table/{tableName}