This is a simplified php rest-server created by extending Codeigniter core classes. I have used to for several of my projects and thought it would be of help to someone looking for a quick way to get up and running with a fully RESTful API.
Clone the project to your projects folder.
git clone https://github.com/Mwangangi/ci-rest.git
cd into the cloned folder
Rename the following files(they are inside application/config folder) as follows:
database-sample.php file to database.php
config-sample.php file to config.php
Edit the files to suit your environment setup and you're set to go!
As you like
e.g This request will fetch all customer records
GET http://ci-rest.test/api/customer
This request will fetch all customer with customer_id 3
GET http://ci-rest.test/api/customer/3
This request will create a new customer record
POST http://ci-rest.test/api/customer
This request will edit customer with customer_id 8 with new details
PUT http://ci-rest.test/api/customer/8
This request will delete customer with customer_id 6
DELETE http://ci-rest.test/api/customer/6
- All data interchange format is JSON.