Usage & API reference
Quick reference for NodusAPI. Full API is available after signing in at the dashboard.
View documentation
See how to use NodusAPI in this short video.
Authentication
- API Key (X-API-Key header). One key per user, works across all projects. Use project slug in path: /api/v1/projectSlug/...
- Bearer JWT. Used by the dashboard. Project context is in the token.
Main endpoints
- GET /health — Health check.
- Auth (Google login, /auth/me).
- Projects (CRUD, switch).
- Schemas (tables, columns).
- Data (CRUD per table).
- Custom endpoints (fn/:slug). Write JavaScript, use request and db.
Custom endpoints
In the dashboard you can add custom endpoints: you write JavaScript that has access to request (body, query, method, headers) and db (query, get, insert, update, delete). The response is whatever you return.
Examples below use the table slug products. Replace with your own table slug from the Tables page.
Request
request.body — parsed JSON for POST/PUT.request.query — URL query params (e.g. ?id=123).request.method — GET, POST, PUT, DELETE.request.headers — request headers.
Database (db)
db.query(tableSlug, options) — list rows (options: page, limit, orderBy, orderDir, filters).db.get(tableSlug, id) — get one row by id.db.insert(tableSlug, data) — create row.db.update(tableSlug, id, data) — update row.db.delete(tableSlug, id) — delete row.
Examples
Simple return
Return a fixed object.
return { message: 'Hello' };Echo query params
Return the URL query string as JSON.
return { query: request.query };Echo request body
Return the request body (POST/PUT).
return { received: request.body };List table rows
Paginated list from a table (e.g. products).
const rows = await db.query('products', { page: 1, limit: 20 });
return { data: rows };Get one row by id
Read id from query, fetch row with db.get.
const id = request.query.id;
if (!id) return { error: 'id required' };
return await db.get('products', id);Create row from body
Insert request.body into the table.
const row = await db.insert('products', request.body);
return { data: row };Update row by id
Read id from query, update with request.body.
const id = request.query.id;
if (!id) return { error: 'id required' };
return await db.update('products', id, request.body);Manage projects, get your API key, and see full docs in the dashboard.