storage

DB

Simple database service

Count

Count records in a table

Free

Request

tablestring

specify the table name

Response

countnumber

the number of records in the table

Request

Response

1{
2    "count": 31
3}

Create

Create a record in the database. Optionally include an "id" field otherwise it's set automatically.

Free

Request

recordobject

JSON encoded record or records (can be array or object)

tablestring

Optional table name. Defaults to 'default'

Response

idstring

The id of the record (either specified or automatically created)

Request

Response

1{
2    "id": "1"
3}

Delete

Delete a record in the database by id.

Free

Request

idstring

id of the record

tablestring

Optional table name. Defaults to 'default'

Response

Request

Response

1{}

Drop Table

Drop a table in the DB

Free

Request

tablestring

Response

Request

Response

1{}

List Tables

List tables in the DB

Free

Request

Response

tablesarray

list of tables

Request

Response

1{
2    "tables": [
3        "users",
4        "events"
5    ]
6}

Read

Read data from a table. Lookup can be by ID or via querying any field in the record.

Free

Request

idstring

Read by id. Equivalent to 'id == "your-id"'

limitnumber

Maximum number of records to return. Default limit is 25. Maximum limit is 1000. Anything higher will return an error.

offsetnumber

orderstring

'asc' (default), 'desc'

orderBystring

field name to order by

querystring

Examples: 'age >= 18', 'age >= 18 and verified == true' Comparison operators: '==', '!=', '<', '>', '<=', '>=' Logical operator: 'and' Dot access is supported, eg: 'user.age == 11' Accessing list elements is not supported yet.

tablestring

Optional table name. Defaults to 'default'

Response

recordsarray

JSON encoded records

Request

Response

1{
2    "records": [
3        {
4            "id": "1",
5            "name": "Jane",
6            "age": 43,
7            "isActive": true
8        }
9    ]
10}

Rename Table

Rename a table

Free

Request

fromstring

current table name

tostring

new table name

Response

Request

Response

1{}

Truncate

Truncate the records in a table

Free

Request

tablestring

Response

Request

Response

1{}

Update

Update a record in the database. Include an "id" in the record to update.

Free

Request

idstring

The id of the record. If not specified it is inferred from the 'id' field of the record

recordobject

record, JSON object

tablestring

Optional table name. Defaults to 'default'

Response

Request

Response

1{}