storage

Database

0.000001 USD

Count

POST /v1/db/Count

Count records in a table

Request

tablestring

specify the table name

Response

countnumber

the number of records in the table

Request

Response

{
    "count": 31
}

0.0001 USD

Create

POST /v1/db/Create

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

Request

idstring

optional record id to use

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

{
    "id": "1"
}

0.000001 USD

Delete

POST /v1/db/Delete

Delete a record in the database by id.

Request

idstring

id of the record

tablestring

Optional table name. Defaults to 'default'

Response

{}

Request

Response

{}

0.000001 USD

Drop Table

POST /v1/db/DropTable

Drop a table in the DB

Request

tablestring

Response

{}

Request

Response

{}

0.000001 USD

List Tables

POST /v1/db/ListTables

List tables in the DB

Request

{}

Response

tablesarray

list of tables

Request

Response

{
    "tables": [
        "example",
        "example2"
    ]
}

0.000001 USD

Read

POST /v1/db/Read

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

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

{
    "records": [
        {
            "id": "1",
            "name": "Jane",
            "age": 43,
            "isActive": true
        }
    ]
}

0.000001 USD

Rename Table

POST /v1/db/RenameTable

Rename a table

Request

fromstring

current table name

tostring

new table name

Response

{}

Request

Response

{}

0.000001 USD

Truncate

POST /v1/db/Truncate

Truncate the records in a table

Request

tablestring

Response

{}

Request

Response

{}

0.0001 USD

Update

POST /v1/db/Update

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

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

{}