GRANTS | Factom Open API 1.0.0 released

You are viewing an older update. There is a newer update available.
Previous Update: GRANTS | Factom Open API 1.0.0 released
We are proud to release the first version of Factom Open API!

Factom Open API is a lightweight REST API for the Factom blockchain. It connects to an existing factomd node and has a built-in Factom wallet that will handle signing data before writing it to the Factom blockchain.



Main features
  • Instant start: use Open API immediately after installation
  • Write data to the blockchain at a fixed cost ($1 for 1000 entries of 1 KB)
  • BaaS-ready: user-based API access, counting usage, limits
  • Read all chain entries at once using a single request (no need to read all entry blocks of chain one by one)
  • Search chains & entries by tags (external IDs)
  • Pagination, sorting, filtering results with query params
  • Generic factomd interface: all factomd API requests are supported via special REST path

API Reference


You can run Factom Open API in 2 different ways:
  • as Docker container
  • download binary and run it manually

Factom Open API design

1. Background fetching
Factom Open API does not store all chains of the Factom blockchain in its local database. Instead, when you start working with a chain using any request (get entry of chain, get chain info, write entry into chain, etc...), the chain is fetched from Factom in the background.

All fetched chains are stored in the local DB, and new entries are added automatically in minute 0-1 of each block.

This allows Factom Open API to be used immediately after installing without a long syncing period with Factom blockchain. It is not designed for applications which require all chains, blocks and entries - e.g. a Factom Explorer.

2. User's chains
A great advantage of Factom Open API is binding chains to API users. This binding is stored locally in the Open API database. It's possible to show users their chains, including ones the user created and all chains that the user has worked with (write, read or search).

This way API users may search their specific chains by External ID(s) instead of searching the entire blockchain.

Swagger support
Following of the Swagger spec was not be a part of the initial grant proposal, but we decided to develop it in order to provide more clients in different languages, using Swagger auto-generated clients.
Right now Open API follows Swagger 2.0 specification.

Auto-generated clients
Auto-generated clients are in beta and don't support base64 auto-encoding/decoding.
We are going to upgrade from Swagger 2.0 to Open API 3.0 specification in the next minor version and improve auto-generated clients.

Factom Open API is open-source project.
Support available @ De Facto's Discord:

A few words about sponsors
Jay, David & Alex from Bedrock Solutions were not just sponsors of this grant project – they actively participated in all discussions of Factom Open API design solutions, suggested a lot of ideas and improvements to design and helped us with testing and Docker packaging. De Facto highly rated Bedrock Solutions as a sponsor and a contributor and we will continue to work together on further Open API updates.

What's next?
We are going to further improve Factom Open API, add new functions and clients.
Here is the roadmap of the project development:
  • Swagger upgrade
    • Upgrade support of Swagger 2.0 → Open API (Swagger) 3.0
    • Improve auto-generated clients (add base64 auto-encoding/decoding inside clients)
    • Create, test and publish more auto-generated clients (Swagger 3.0 required)
  • New endpoints
    • Multiple /admin endpoints to manage Open API instance, settings and API users
    • /queue endpoint to check Open API write-queue via API endpoint
  • Admin WebUI
    • A web-interface for managing Factom Open API
    • Change Factom Open API server settings
    • Manage API users, limits
    • Queue, Chains, Entryblocks, Entries viewer
    • Logs viewer
    • Auto-generation of Es/EC keypair (no need to generate EC via wallet)
  • Callbacks
    • Allow API users to create and receive callbacks for different actions endings (e.g. receive callback, when new entry processed on blockchain)
    • Admin's permanent callbacks / notifications (e.g. when EC balance is lower than X)
  • Factom Identities
    • Factom Identities support (2nd layer)
    • /identity endpoints inside Open API to work with Factom Identities
  • GraphQL API
  • Websockets
  • Security
    • Auto-SSL with Lets Encrypt
  • Test coverage
  • Factom Open API marketplace
    • A directory of apps using Factom Open API
Last edited:
You are viewing an older update. There is a newer update available.