tip: 26 title: UTXO Indexer API description: UTXO Indexer REST API routes and objects in OpenAPI Specification author: Levente Pap (@lzpap)
discussions-to: https://github.com/iotaledger/tips/pull/62, https://github.com/iotaledger/tips/discussions/53 status: Proposed type: Standards layer: Interface created: 2022-01-27
The IOTA UTXO Indexer API defines the standard REST API interface that need to be fulfilled by indexer node plugins or standalone indexer applications.
The purpose of the UTXO Indexer API is to:
- Provide access to structured, indexed records (outputs) of the UTXO ledger of the Tangle,
- Support client queries on the structured data to fetch outputs of interest,
- Offload network critical nodes from having to run the indexer application.
TIP-18 introduces new output types into the IOTA UTXO ledger. These new outputs support a variety of new features such as different unlocking conditions and feature blocks.
The indexer API makes it possible for clients to retrieve outputs based on present features, furthermore to filter them with more complex queries.
The main client application the API is designed for are wallets, but it does not mean that other applications could not use or extend it.
The API is described using the OpenAPI Specification:
This discussion gives a good overview of why the core and indexer APIs are separated. In short, indexing the ledger is considered to be a L2 application, and as such, it is not a mandatory part of IOTA core node implementations.
Alternatively, all indexing could be baked into the core software that would require us to factor in the "cost" of indexing into byte cost of outputs, resulting in higher minimal dust deposit requirements. Network nodes that do not interact with clients but are the backbone of the network would also have to perform indexing tasks for no reason.
The new architecture also opens up the door for developing more advanced indexing applications detached from node implementations.
Some routes from the previous REST API (TIP-13) are removed and are supported in the new indexer API. For more details, browse TIP-25.
Hornet reference implementation:
Copyright and related rights waived via CC0.