Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/moemoe89/simple-codeigniter-rest-api
🔥 Simple PHP code using Codeigniter framework for building Rest API
https://github.com/moemoe89/simple-codeigniter-rest-api
codeigniter php rest-api
Last synced: about 1 month ago
JSON representation
🔥 Simple PHP code using Codeigniter framework for building Rest API
- Host: GitHub
- URL: https://github.com/moemoe89/simple-codeigniter-rest-api
- Owner: moemoe89
- License: mit
- Created: 2015-12-27T04:39:46.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2023-05-07T02:04:01.000Z (over 1 year ago)
- Last Synced: 2024-10-01T00:41:06.236Z (about 1 month ago)
- Topics: codeigniter, php, rest-api
- Language: HTML
- Homepage:
- Size: 1.38 MB
- Stars: 66
- Watchers: 13
- Forks: 63
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Contributing: contributing.md
- License: license.txt
Awesome Lists containing this project
README
# Simple Codeigniter REST API
Simple source code for learning basic backend developer using REST API (login, CRUD).# Demo
[Visit Here](https://www.youtube.com/watch?v=MbkMrnisyo4)# Setup
Download or clone [Master File](simple-codeigniter-rest-api)
and then config & import MySQL databaseYou can use [POSTMAN](https://www.getpostman.com/) or anything else for simulate frontend
# Test the API
You can test the API by including header `Content-Type`,`Client-Service` & `Auth-Key` with value `application/json`,`frontend-client` & `simplerestapi` in every requestAnd for API except `login` you must include `id` & `token` that you get after successfully login. The header for both look like this `User-ID` & `Authorization`
List of the API :
`[POST]` `/auth/login` json `{ "username" : "admin", "password" : "Admin123$"}`
`[GET]` `/book`
`[POST]` `/book/create` json `{ "title" : "x", "author" : "xx"}`
`[PUT]` `/book/update/:id` json `{ "title" : "y", "author" : "yy"}`
`[GET]` `/book/detail/:id`
`[DELETE]` `/book/delete/:id`
`[POST]` `/auth/logout`