Guide
The Fibery API provides a way to integrate Fibery with your external systems and automate routine tasks.
Here is the list of things you can do:
Understand you workspace schema via Schema API (use to understand what databases and fields you have).
Customize Apps (Spaces) by creating, renaming and deleting Types (Databases) and Fields: Type API and Field API.
Read, create, update and delete Entities: Entity API.
Work with rich text Fields.
Upload, attach and download files: File API.
Update other tools when something changes in Fibery using Webhooks.
Automate routine actions with programmable action buttons and rules: Scripts in Automations.
Integrate your custom data into Fibery database using custom apps.
If something is missing, please describe your use case in the community — we’ll try our best to help.
In the interface, Type = Database, App = Space. To find out why, check Terminology.
Getting Started
Fibery API is based on commands. Both reading and editing data means sending a POST request with JSON payload to https://YOUR_ACCOUNT.fibery.io/api/commands endpoint.
The endpoint works with batches of commands. The request should contain an array of commands with their names and arguments. You'll get an array back too. Take a look at the example below in which we retrieve the basic info about a user.
While there are no official clients for any platform, there is an unofficial API client for Node.js.
https://gitlab.com/fibery-community/unofficial-js-client
It mostly follows the API functionality, but makes it easier to create a domain Type, a relation or a single-select Field.
const Fibery = require('fibery-unofficial');
const fibery = new Fibery({host: "YOUR_ACCOUNT.fibery.io", token: YOUR_TOKEN});
const users = await fibery.entity.query({
"q/from": "fibery/user",
"q/select": ["fibery/id","user/name"],
"q/limit": 1
});
Here’s the result:
[
{
"fibery/id": "7dcf4730-82d2-11e9-8a28-82a9c787ee9d",
"user/name": "Arthur Dent"
}
]
And here are cURL examples:
curl -X POST https://YOUR_ACCOUNT.fibery.io/api/commands \
-H 'Authorization: Token YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '
{
"command": "fibery.entity/query",
"args": {
"query": {
"q/from": "fibery/user",
"q/select": ["fibery/id", "user/name"],
"q/limit": 1
}
}
}
'
Here’s the result:
{
"success": true,
"result": [
{
"fibery/id": "7dcf4730-82d2-11e9-8a28-82a9c787ee9d",
"user/name": "Arthur Dent"
}
]
}