DEV Community

Priyantha Weerasinghe
Priyantha Weerasinghe

Posted on

How to Build a REST API Without a Backend Server

How to Build a REST API Without a Backend Server

Building a REST API usually means setting up a backend stack.
You create a database, write CRUD endpoints, deploy a server, and maintain infrastructure.

For many projects, this process can be time-consuming and unnecessary.

What if you could create an API directly from a table interface without writing backend code or managing servers?

In this guide, we’ll walk through how to build a working REST API without running a backend server, using OpenTableAPI.


The Traditional Way of Building APIs

Most developers follow this architecture:

Frontend Application
        ↓
Backend Server (Node / Laravel / Django)
        ↓
Database (PostgreSQL / MySQL)
Enter fullscreen mode Exit fullscreen mode

This approach works well for large systems, but it also introduces extra complexity:

  • Server deployment
  • Database setup
  • API endpoint development
  • Infrastructure maintenance
  • Security configuration

For small projects, internal tools, or prototypes, this setup can slow development.


A Simpler Approach

A simpler architecture is:

Frontend Application
        ↓
OpenTableAPI
Enter fullscreen mode Exit fullscreen mode

Instead of building and hosting your own backend, you design tables in a spreadsheet-style interface and OpenTableAPI automatically generates a REST API for them.

This means you don't need to manage:

  • Backend servers
  • Database schemas
  • CRUD endpoints
  • DevOps infrastructure

Step 1 — Create an Account

Start by creating a free account at:

https://opentableapi.com
Enter fullscreen mode Exit fullscreen mode

Registration requires only a username and password.

Once logged in, you'll see the dashboard where you can create projects and tables.


Step 2 — Create a Project

A project is a container for your tables and APIs.

Click Create Project and give it a name.

Each project generates two important identifiers:

Project Key

Used in API URLs.

/v1/{projectKey}/{tableName}
Enter fullscreen mode Exit fullscreen mode

API Key

Used for authentication.

X-API-Key: your_api_key_here
Enter fullscreen mode Exit fullscreen mode

Step 3 — Create a Table

Next, create your first table.

Example table:

products
Enter fullscreen mode Exit fullscreen mode

Then add columns such as:

Column Type
name string
price number
status select
featured boolean

OpenTableAPI supports multiple column types including:

  • string
  • number
  • boolean
  • select
  • json
  • rich media
  • image
  • reference (relationships)

Step 4 — Add Data

OpenTableAPI uses a spreadsheet-style interface.

To add data:

  1. Click Add Row
  2. Enter values directly in cells
  3. Press Ctrl + S to save

Example data:

name price status
Starter Plan 19 active
Pro Plan 49 active

Step 5 — Call the API

Once the table exists, the API becomes available instantly.

Example request:

curl -X GET \
"https://api.opentableapi.com/v1/{projectKey}/products" \
-H "X-API-Key: your_api_key_here"
Enter fullscreen mode Exit fullscreen mode

Example response:

{
  "data": [
    {
      "id": "uuid-1",
      "name": "Pro Plan",
      "price": 49,
      "status": "active"
    }
  ],
  "total": 2,
  "page": 1,
  "limit": 20,
  "pages": 1
}
Enter fullscreen mode Exit fullscreen mode

Your table is now accessible as a REST API.


Available API Operations

Every table automatically supports standard REST operations.

List records

GET /v1/{projectKey}/{tableName}
Enter fullscreen mode Exit fullscreen mode

Get a single record

GET /v1/{projectKey}/{tableName}/{id}
Enter fullscreen mode Exit fullscreen mode

Create a record

POST /v1/{projectKey}/{tableName}
Enter fullscreen mode Exit fullscreen mode

Update a record

PUT /v1/{projectKey}/{tableName}/{id}
Enter fullscreen mode Exit fullscreen mode

Delete a record

DELETE /v1/{projectKey}/{tableName}/{id}
Enter fullscreen mode Exit fullscreen mode

Example create request:

curl -X POST \
"https://api.opentableapi.com/v1/myproject/products" \
-H "X-API-Key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{ "name": "Enterprise Plan", "price": 99 }'
Enter fullscreen mode Exit fullscreen mode

Filtering and Pagination

The API also supports query parameters.

Pagination example:

GET /v1/myproject/products?page=2&limit=10
Enter fullscreen mode Exit fullscreen mode

Select specific fields:

GET /v1/myproject/products?fields=id,name,price
Enter fullscreen mode Exit fullscreen mode

Filter results:

GET /v1/myproject/products?name=John
Enter fullscreen mode Exit fullscreen mode

Combined example:

GET /v1/myproject/products?name_like=Jo&page=1&limit=10
Enter fullscreen mode Exit fullscreen mode

Access Control

OpenTableAPI includes role-based permissions similar to a CMS.

Owner

Full control over tables, members, and API keys.

Editor

Can add, update, and delete rows.

Viewer

Read-only access.

You can also restrict API access by enabling or disabling HTTP methods such as GET, POST, PUT, and DELETE.


When Should You Use This Approach?

This method works especially well for:

  • SaaS prototypes
  • Internal dashboards
  • Admin panels
  • Product catalogs
  • Configuration APIs
  • Rapid MVP development

Instead of building and maintaining a backend stack, you can use OpenTableAPI as your hosted API backend.


Final Thoughts

Building a REST API traditionally requires significant backend development and infrastructure management.

Tools like OpenTableAPI simplify this process by allowing developers to design data visually and instantly expose it through APIs.

For many projects, especially prototypes and internal tools, this approach can significantly reduce development time and complexity.

If you're looking for a faster way to build APIs without managing servers, this workflow is worth exploring.

Learn more at:

https://opentableapi.com
Enter fullscreen mode Exit fullscreen mode

Tags

#api
#restapi
#backend
#webdev
#developer
Enter fullscreen mode Exit fullscreen mode

Top comments (0)