Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/saidqb/codeigniter-rest-api
codeigniter 4 rest api
https://github.com/saidqb/codeigniter-rest-api
codeigniter4 rest-api
Last synced: about 5 hours ago
JSON representation
codeigniter 4 rest api
- Host: GitHub
- URL: https://github.com/saidqb/codeigniter-rest-api
- Owner: saidqb
- License: mit
- Created: 2024-07-19T03:04:01.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-07-23T15:14:18.000Z (6 months ago)
- Last Synced: 2024-11-28T23:04:34.943Z (about 2 months ago)
- Topics: codeigniter4, rest-api
- Language: PHP
- Homepage:
- Size: 3.26 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# codeigniter-rest-api
progress build ...
using Myth/Auth library for authanticate
## Requirement
Framework Codeigniter >= 4.5
PHP >= 8.1## Featured
- [x] Global access using Api-Key
- [x] Authorization Bearer
- [x] CRUD User, Role, Permission default from Myth/Auth
- [ ] Example postman# postman
## postman
HEADER
```
#Akses Api
Api-Key:# Akses data login, token didapat dari login
Authorization: Bearer
```## postman response default
display single data
```json
{
"status": 200,
"success": true,
"error_code": 0,
"message": "success",
"data": {
"item": {}
}
}
```display multiple data
```json
{
"status": 200,
"success": true,
"error_code": 0,
"message": "success",
"data": {
"items": [],
"pagination" : {}
}
}
```## Query Params Doc
DOC
===============## Filter Query By Field
| Key | Name | Result |
| ----- | ------------------ | ------------------------------------------------------------------ |
| `eq` | equal | `field = 'value'` |
| `neq` | not equal | `field != 'value'` |
| `lt` | lower than | `field < 'value'` |
| `gt` | greater than | `field > 'value'` |
| `lte` | lower than equal | `field <= 'value'` |
| `gte` | greater than equal | `field >= 'value'` |
| `le` | like end | `field LIKE 'value%'` |
| `ls` | like start | `field LIKE '%value'` |
| `lse` | like start end | `field LIKE '%value%'` |
| `in` | where IN | `field IN (value)` value using sparator `,` ex `1,2,3,4` / `1` |
| `nin` | where NOT IN | `field NOT IN (value)` value using sparator `,` ex `1,2,3,4` / `1` |### Avilable Param
1. Sort => `sort=-user_name` => `SORT user_name DESC`
2. Sort => `sort=user_name` => `SORT user_name ASC`
3. Sort => field sort sesuai dengan result
4. limit => default: 10
5. page => default: 1
6. search => `search=keyword`## COFFEE FOR BEST PERFORMANCE
**[COFFEE HERE](https://saidqb.github.io/coffee)** for more inovation
OR