Developing JSON APIs with REST Using PHP
Audience: Developers familiar with programming concepts but new to REST APIs and modern PHP
Goal: Enable participants to design, build, secure, and deploy production-ready RESTful JSON APIs
using PHP
Format: Instructor-led, hands-on
Daily Duration: 8 hours/day
Total Duration: 3 Days (24 Hours)
DAY 1 – REST, HTTP & PHP API Foundations (8 Hours)
1. API & REST Concepts (1 hr)
• API types
• REST principles
• JSON format
2. HTTP Deep Dive (1.5 hrs)
• Methods & status codes
• Headers
• Stateless requests
3. PHP Essentials for APIs (2 hrs)
• PHP 8 syntax
• Arrays, functions
• JSON handling
4. API Project Setup & Routing (2.5 hrs)
• PHP server setup
• Front controller
• Router implementation
Hands-on: Basic API skeleton
5. Response Formatting & Errors (1 hr)
• Consistent API responses
• Error handling strategy
DAY 2 – Database & CRUD APIs (8 Hours)
1. Database Design & PDO (2 hrs)
• MySQL schema design
• Secure PDO usage
2. CRUD Operations (3 hrs)
• Create
• Read (list & detail)
• Update
• Delete
Hands-on: Full CRUD resource
3. Validation & Data Integrity (1.5 hrs)
• Input validation
• Business rules
4. Pagination & Filtering (1.5 hrs)
• Query parameters
• Pagination patterns
DAY 3 – Security, Testing & Capstone (8 Hours)
1. Authentication & Authorization (2.5 hrs)
• JWT authentication
• Securing routes
• User roles (basic)
2. API Testing & Debugging (2 hrs)
• Postman collections
• Common API bugs
3. Deployment & Best Practices (1.5 hrs)
• Environment variables
• Production configs
• Security checklist
4. Practical Project (2 hrs)
Project Requirements:
• RESTful endpoints
• CRUD + authentication
• Validation & errors
Prepared By:
Raphael De Castro
Mobile/Web Developer/Trainer