A simple http key value db service over airtable database for easy access of key value pairs just like jsonbin, made and deployed with deno. Trying Deno for the first time.
Now you don't need to signup for any free tier or buy any costly storage login
directly with github and start building. Each user get a base and we call it Airbase
.
https://airbin.deno.dev/_/login
- The rest api is very simple to use but has some limitations
- Each user only get 1200 keys.
- Each request has a soft limit of 4 MiB data.
- So technically you get nearly 4 GiB storage which is good for small projects
https://airbin.deno.dev/:USER_ID/:KEY
This request gets the value without token if data is set to public else token is required and returns null
if no data is present at that space.
Header | Description |
---|---|
Authorization | Bearer :TOKEN The token can be obtained after /_/login . |
Query | Required? | Description |
---|---|---|
USER_ID | REQUIRED | The airbase userid. can be obtained from /_/me after /_/login . |
KEY | REQUIRED | The key where the value is saved. |
https://airbin.deno.dev/:USER_ID/:KEY
This request puts the value in the :KEY
and if key already has a value it overwrites the value.
Header | Description |
---|---|
Authorization | Bearer :TOKEN The token can be obtained after /_/login . |
Body | Required? | Description |
---|---|---|
Body | REQUIRED | Body should be the value to store can be plain or json (prefer json). |
https://airbin.deno.dev/:USER_ID/:KEY
This request can alter the data access
to be pulbic or private(can be accessed without a token or not).
Header | Description |
---|---|
Authorization | Bearer :TOKEN The token can be obtained after /_/login . |
Body (JSON) | Required? | Description |
---|---|---|
public | REQUIRED | true or false . |
https://airbin.deno.dev/:USER_ID/:KEY
This request deletes the :KEY
from the airbase.
Header | Description |
---|---|
Authorization | Bearer :TOKEN The token can be obtained after /_/login . |
https://airbin.deno.dev/_/me
This request gets the user detail of the authenticated token (if accessing from program need to specify x-user
header with value of userid).
Header | Description |
---|---|
Authorization | Bearer :TOKEN The token can be obtained after /_/login . |
x-user | :USER_ID The userid only to be specified when accessing via curl or scripts |
airbin can be selfhosted on any platform supporting deno after that just setup the Config.js
and .ENV
files.
Here ONLY_SELF_HOSTING
means that login via github will be disabled and only admin can create the airbases via /_/create?airbase=Name
What is ADMIN_TOKEN
? it is the token which admin specify to access any value and create airbases. Here admins means the one who is hosting.
Key | Description |
---|---|
API_KEY | The airtable personal access token. |
WORKSPACE_KEY | The airtable workspace id. |
WORKSPACE_KEY | The airtable workspace id. |
CLIENT_ID | Github oauth app client id optional for only self hosting. |
CLIENT_SECRET | Github oauth app client secret optional for only self hosting. |
HASH_SECRET | This secret is used to generate user tokens so keep it private and hard to guess. |
ADMIN_TOKEN | This is special admin token from which admin can access any airbase commands. |
Note : Airtable has api limit of 5 req/sec
create the issue in the repo and i will try to fix it most probably.
- author : shivzee
- IDE used : Visual Studio Code
- Gitpod