Course Code: postbespoke
Duration: 14 hours
Prerequisites:

Knowledge of SQL

Familiarity with PostgreSQL

Understanding of RESTful APIs

Familiarity with HTTP (GET, POST, PUT, DELETE)

Basic understanding of security and authentication

Overview:

PostgREST is a standalone web server that turns your PostgreSQL database directly into a RESTful API. The structural constraints and permissions in the database determine the API endpoints and operations.

Course Outline:

Day 1:

Session 1 - Introduction to PostgREST

Overview of PostgREST and its features

Advantages of using PostgREST for building RESTful APIs

Understanding the PostgREST architecture and how it works

Lab 1: Installing PostgREST and running it as a standalone web server

Quiz 1: Multiple choice questions on PostgREST concepts and features

Session 2 Setting up PostgREST

Installing and configuring PostgREST

Creating a sample database and tables

Creating a configuration file for PostgREST

Running PostgREST as a standalone web server

Lab 2: Creating a sample database and tables

Lab 3: Creating a configuration file for PostgREST

Quiz 2: Short answer questions on PostgREST installation and configuration

Session 3 Building RESTful APIs with PostgREST

Using HTTP methods (GET, POST, PUT, DELETE) to interact with the API

Querying the database using filters, sorting, and pagination

Exposing database views and functions as API endpoints

Implementing security and authentication in PostgREST

Lab 4: Implementing basic CRUD operations with PostgREST

Lab 5: Exposing database views as API endpoints

Quiz 3: Scenario-based questions on using filters and pagination with PostgREST

Day 2:

Session 1 Advanced PostgREST Topics

Implementing nested resources and relationships

Handling database transactions using PostgREST

Optimizing API performance and scalability

Using PostgREST with other tools and frameworks (e.g., Swagger)

Lab 6: Implementing nested resources and relationships with PostgREST

Lab 7: Handling database transactions with PostgREST

Quiz 4: Multiple choice questions on advanced PostgREST topicstools (e.g., Postman)

Session 2 Hands-on Practice

Creating a sample project using PostgREST

Designing a database schema for the project

Implementing API endpoints using PostgREST

Testing the API with various Session 1 (2 hours)

Lab 8: Creating a sample project using PostgREST

Lab 9: Implementing additional API endpoints for the project

Quiz 5: Short answer questions on building APIs with PostgREST

Session 3 Best Practices and Tips

Best practices for designing APIs with PostgREST

Tips for maintaining and scaling PostgREST APIs

Real-world examples of using PostgREST in production

Q&A and Wrap-up

Lab 10: Optimizing API performance and scalability with PostgREST

Quiz 6: Scenario-based questions on using PostgREST in real-world projects

Q&A and Wrap-up