Ordnary

Docs Ordnary Web Services Ordnary Serverlite

Quickstart

Create a database, add a table in the SQL console, create an API token and query it from your app with curl, JavaScript or Python.

5 min readBeginner

1. Create a database

  1. 1

    Open Ordnary Serverlite

    In the console's drawer choose Ordnary Serverlite, then Create database.

  2. 2

    Name it

    For example production. Lowercase letters, digits, - and _.

  3. 3

    Keep Automatic placement

    Or pick a location hint or the EU jurisdiction. Placement cannot be changed later.

  4. 4

    Create

    The database opens in the SQL console, ready to use.

2. Create a table

Paste this into the SQL console and press Run, or ⌘ Enter (on Windows and Linux Ctrl Enter):

SQL console
CREATE TABLE users (
  id INTEGER PRIMARY KEY,
  email TEXT NOT NULL UNIQUE,
  name TEXT,
  created_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP
);

INSERT INTO users (email, name) VALUES
  ('ada@example.com', 'Ada'),
  ('linus@example.com', 'Linus');

SELECT * FROM users;

Every statement gets its own result, with the rows and how many rows it read and wrote. The table now shows under the Tables tab.

3. Create an API token

Under Ordnary Serverlite, open API tokens. Give the token a name, choose Read and write, limit it to the production database and create it. Copy the secret: it is shown once. Put it in your app's environment:

ORDNARY_SQLITE_TOKEN=osq_<your-token>

4. Query from your app

Show examples for
curl https://serverlite.ordnary.com/v1/databases/production/query \
  -H "Authorization: Bearer $ORDNARY_SQLITE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"sql": "SELECT * FROM users WHERE email = ?", "params": ["ada@example.com"]}'

5. Check

Response
{
  "results": [
    {
      "rows": [
        { "id": 1, "email": "ada@example.com", "name": "Ada", "created_at": "2026-11-02 09:14:07" }
      ],
      "meta": { "duration": 0.21, "changes": 0, "lastRowId": 0, "rowsRead": 1, "rowsWritten": 0, "sizeAfter": 16384 }
    }
  ]
}
Was this page helpful?
Updated 2 November 2026 Suggest an edit

Choose which cookies Ordnary may use. You can change this at any time via Cookie settings at the bottom of every page.