REST API Development Guide
Installation & Setup
Step one, sign up for a free account.
Within the Flybase Dashboard you can create, manage and delete Flybase apps. Clicking on a specific Flybase app lets you view and modify your app's data in realtime. In your app dashboard, you can also set Security, manage your app's authentication, deploys, and view analytics.
HTTPS is required. Flybase only responds to encrypted traffic so that your data remains safe.
All URLs referenced in the documentation have the following base:
The Flybase REST API is served over HTTPS. To ensure data privacy, unencrypted HTTP is not supported.
In order to access any data from the REST API, you must pass a header called
Calling the REST API without any actions in the URL will result in validating the API Key. You can also call the REST API with the following end point to validate the API key:
curl -H "X-Flybase-API-Key: 74c8062f-cd6f-4c07-8baf-b1h241496dec" https://api.flybase.io/
curl -H "X-Flybase-API-Key: 74c8062f-cd6f-4c07-8baf-b1h241496dec" https://api.flybase.io/validate_key
An invalid API Key will result in not being able to do any other actions with the REST API. You can create new API Keys and add rules such as limiting access to apps or whitelisting access only to specified IP addresses or websites from your account.
To get a list of collections in the specified app:
curl -H "X-Flybase-API-Key: 74c8062f-cd6f-4c07-8baf-b1h241496dec" https://api.flybase.io/apps/MY-APP/collections
To create a new collection, just start using it! Collections are created implicitly just by using them. As soon as you POST your first document you should see the collection appear.
That's it! Now we're ready to start reading and writing data to Flybase which we'll cover in the next section.