Post #14545

Signature not verified

This entry might be using an old signature, or it was signed by a key that does not exist on the server.

The entry content as it exists in the database. This should be verified against the blockchain entry.
GRANTS | Factom Open API 1.0.0 released
[B][SIZE=7][COLOR=rgb(0, 0, 0)]We are proud to release the first version of [/COLOR][COLOR=rgb(44, 130, 201)]Factom Open API![/COLOR][/SIZE][/B]

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.

[B]GitHub: [/B][URL][/URL]
[B]Documentation:[/B] [URL][/URL]


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

[SIZE=6][B]API Reference[/B][/SIZE]

[*]Documentation on Gitbook: [URL=''][/URL]
[*]Built-in Swagger specification: http://<factom_open_api_server_ip_and_port>/docs/index.html
[*][URL='']POST /chains[/URL] – [I]Create chain[/I]
[*][URL='']GET /chains[/URL] – [I]Get user's chains[/I]
[*][URL='']POST /chains/search[/URL] – [I]Search user's chains by ExtIDs[/I]
[*][URL='']GET /chains/:chainId[/URL] – [I]Get chain by ChainID[/I]
[*][URL='']GET /chains/:chainId/entries[/URL] – [I]Get chain entries[/I]
[*][URL='']GET /chains/:chainId/entries/first[/URL] – [I]Get first entry of chain[/I]
[*][URL='']GET /chains/:chainId/entries/last[/URL] – [I]Get last entry of chain[/I]
[*][URL='']POST /chains/:chainId/entries/search[/URL] – [I]Search entries in chain by ExtIDs[/I]
[*][URL='']POST /entries[/URL] – [I]Create entry in chain[/I]
[*][URL='']GET /entries/:entryHash[/URL] – [I]Get entry by EntryHash[/I]
[*][URL='']POST /factomd/:method[/URL] – [I]Generic factomd interface[/I]
[*][URL='']GET /user[/URL] – [I]Get user info[/I]
[*][URL='']GET /[/URL] – [I]Get API info[/I]

[SIZE=4]You can run Factom Open API in 2 different ways:[/SIZE]
[*]as Docker container
[*]download binary and run it manually

[SIZE=6][B]Factom Open API design[/B][/SIZE]

[SIZE=5][B]1. Background fetching[/B][/SIZE]
Factom Open API does not store [I]all chains[/I] 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 [I]all[/I] chains, blocks and entries - e.g. a Factom Explorer.

[SIZE=5][B]2. User's chains[/B][/SIZE]
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 [I]their chains[/I], 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.

[SIZE=6][B]Swagger support[/B][/SIZE]
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 [URL='']Swagger 2.0 specification[/URL].

[SIZE=6][B]Auto-generated clients[/B][/SIZE]
Auto-generated clients are in [B]beta[/B] 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: [URL][/URL]

[SIZE=6][B]A few words about sponsors[/B][/SIZE]
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.

[COLOR=rgb(65, 168, 95)]--[/COLOR]
[SIZE=6][B][COLOR=rgb(65, 168, 95)]What's next?[/COLOR][/B][/SIZE]
We are going to further improve Factom Open API, add new functions and clients.
Here is the roadmap of the project development:
[*][B]Swagger upgrade[/B]
[*]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)
[*][B]New endpoints[/B]
[*]Multiple /admin endpoints to manage Open API instance, settings and API users
[*]/queue endpoint to check Open API write-queue via API endpoint
[*][B]Admin WebUI[/B]
[*]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)
[*]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)
[*][B]Factom Identities[/B]
[*]Factom Identities support (2nd layer)
[*]/identity endpoints inside Open API to work with Factom Identities
[*][B]GraphQL API[/B]
[*]Auto-SSL with Lets Encrypt
[*][B]Test coverage[/B]
[*][B]Factom Open API marketplace[/B]
[*]A directory of apps using Factom Open API
This is the raw content, without BBCode parsing.