Book Image

Building a Web Application with PHP and MariaDB: A Reference Guide

By : Sai S Sriparasa
Book Image

Building a Web Application with PHP and MariaDB: A Reference Guide

By: Sai S Sriparasa

Overview of this book

Table of Contents (17 chapters)
Building a Web Application with PHP and MariaDB: A Reference Guide
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 8. REST API

In the last chapter, we discussed different types of caching and implemented database caching, memory caching, and content caching. Our application currently allows users to view student and course information. An important thing to note here is that a user has to access the application to view the data. In this chapter, let's build an Application Programming Interface (API) that will allow another application to request for data from our application. An API is a collection of rules that describes how one application can interact with another application. In our case, we will build a REST API that will allow an external application to perform add and fetch operations.