---
title: "Discussion on \"A poor man's API\" | Hashnode"
description: "Discussion on \"A poor man's API\". Creating a full-fledged API requires resources, both time and money. You need to think about the model, the design, the REST principles, etc., without writing a single line of code. Most of the time, you don't know whether it's worth it: you'd like t..."
url: "https://hashnode.com/posts/poor-mans-api/637e4be0b19e2ed6be0ad8a1"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [A poor man's API](https://apisix.hashnode.dev/poor-mans-api?utm_source=hashnode&utm_medium=feed)

Creating a full-fledged API requires resources, both time and money. You need to think about the model, the design, the REST principles, etc., without writing a single line of code. Most of the time, you don't know whether it's worth it: you'd like t...

Nov 23, 2022 · 8 min read · apisix.hashnode.dev  
Read the article

-   [#apis](https://hashnode.com/tag/apis)
-   [#postgresql](https://hashnode.com/tag/postgresql)
-   [#api-gateway](https://hashnode.com/tag/api-gateway)
-   [#mvp](https://hashnode.com/tag/mvp)

## Written by

[Nicolas Fränkel](https://hashnode.com/@nfrankel)

@nfrankel · Geneva

  
[View profile](https://hashnode.com/@nfrankel)

Developer Advocate

Technologist focusing on cloud-native technologies, DevOps, CI/CD pipelines, and system observability. His focus revolves around creating technical content, delivering talks, and engaging with developer communities to promote the adoption of modern software practices. With a strong background in software, he has worked extensively with the JVM, applying his expertise across various industries. In addition to his technical work, he is the author of several books and regularly shares insights through his blog and open-source contributions.

## Responses 5

Markdown supported · ⌘↵ to post

[Federico Kereki](https://hashnode.com/@fkereki)

[Nov 25, 2022](https://hashnode.com/posts/poor-mans-api/637e4be0b19e2ed6be0ad8a1/comment/6380a67102ed71f5750f0d16)

This is an interesting idea, but having an API based on physical tables instead of logical entities is considered an antipattern. For instance [here](https://learn.microsoft.com/en-us/azure/architecture/best-practices/api-design) at it reads: _A resource doesn't have to be based on a single physical data item. For example, an order resource might be implemented internally as several tables in a relational database, but presented to the client as a single entity. Avoid creating APIs that simply mirror the internal structure of a database. The purpose of REST is to model entities and the operations that an application can perform on those entities. A client should not be exposed to the internal implementation._

[Nicolas Fränkel](https://hashnode.com/@nfrankel)

[Nov 26, 2022](https://hashnode.com/posts/poor-mans-api/637e4be0b19e2ed6be0ad8a1/comment/6380a67102ed71f5750f0d16#reply-6382a239bdbd2c06dff637f0)

You're right... in theory. And then, as I mentioned, sometimes, you don't want to spend time and money implementing the perfect solution: you just want to see if there's traction and interested.

[Lucky victory](https://hashnode.com/@codewithveek)

[Nov 24, 2022](https://hashnode.com/posts/poor-mans-api/637e4be0b19e2ed6be0ad8a1/comment/637f4c310d2fc8df7adde539)

Interesting 👏

[Vladimir Kolev](https://hashnode.com/@VladoKo)

[Nov 24, 2022](https://hashnode.com/posts/poor-mans-api/637e4be0b19e2ed6be0ad8a1/comment/637f12367acb14d931edfa87)

Great article! I had my look on APISIX for some time and didn't know about PostgREST. Btw. perhaps your could revisit your Dockerfile and add the apt-get layer after the `FROM` otherwise you will have to redownload the apt dependencies on every build for every change. Also `WORKDIR` will create the directory if it doesn't exist.

```
FROM debian:bookworm-slim                                                   #1

RUN apt-get update && \
    apt-get install -y libpq-dev xz-utils

ARG POSTGREST_VERSION=v10.1.1                                               #2
ARG POSTGREST_FILE=postgrest-$POSTGREST_VERSION-linux-static-x64.tar.xz     #2


WORKDIR postgrest

ADD github.com/PostgREST/postgrest/releases/download$POSTGREST_VERSION/$POSTGREST_FILE \
    .                                                                       #3

RUN tar xvf $POSTGREST_FILE && \
    rm $POSTGREST_FILE                                                      #4
```

[Someshwar Tripathi](https://hashnode.com/@neon007)

[Nov 24, 2022](https://hashnode.com/posts/poor-mans-api/637e4be0b19e2ed6be0ad8a1/comment/637ec41f7acb14d931edf17b)

Great article💯

[Paul](https://hashnode.com/@Chibuezedev)

[Nov 23, 2022](https://hashnode.com/posts/poor-mans-api/637e4be0b19e2ed6be0ad8a1/comment/637e93d77acb14d931edeeda)

Nice article!!
