DEV Community

API Maker®
API Maker®

Posted on

How to Get Data by ID Using API Maker 🚀

✔ If you are looking for a fast and easy way to get data by ID from any database using a single API, you should check out API Maker.

✔ You can also use feature of deep populate and get data from different database types and get in only one API call also.

Simple get by id
/api/gen/user-path/instance/database/table/get-by-id/1

Select data
/api/gen/user-path/instance/database/table/get-by-id/1?select=first_name,last_name

Deep data
/api/gen/user-path/instance/database/table/get-by-id/1?deep=[{s_key:'customer_id',t_col: 'products',t_key:'owner_id'}]

👉 API Maker can generate APIs for 8 different databases, such as MongoDB, MySQL, PostgreSQL, Oracle, SQL Server, TiDB, Percona XtraDB, and Redis.

👉 You can query data by ID from any of these databases with ease and flexibility using the get by id API.

👉 The get by id API is a simple and efficient API that allows you to get data by ID from any table in any database.

👉 You only need to provide two parameters: id. You can provide primaryKey if you want to override default primary key value in the API call.

👉 The id is the value of the primary key of the table that you want to query.

👉 The primaryKey is the name of the primary key column of the table that you want to query.

👉 The get by id API will return a single document or row that matches the id and primaryKey values.

⭐ To use the get by id API, you need two main things:

👉 The URL of the API request.

👉 A well-defined table schema that describes the structure and properties of each table.

https://apimaker.dev/

https://docs.apimaker.dev/

https://youtu.be/mrTH2GyYKsQ?si=crEO5bsNBwYqPN0t

https://www.youtube.com/@api_maker

Top comments (0)