To set up the People API, create a database called 'peopleapi', then run the following commands:
- php artisan migrate
- php artisan data:populate
Demo application comes with 2 accounts
- admin@testdemo.com / demoadmin
- user@testdemo.com / demo
All routes are versioned for future proofing with a v1 perfix and include
- Public Routes
- (POST) /authenticate - which takes a json object of 'user' with 'email' and 'password', return json with user_id, token
- Private Routes
- Fetch all
- (get) /api/v1/applicants
- Fetch individual applicat by id
- (get) /api/v1/applicant/[id]
- Search applicant by name, and page. Defaults to 0
- (get) /api/v1/applicant/search/[name]/[status]/[page]
- status ['all','open','interviewing','contacted','rejected']
- page 0,1,2
- (get) /api/v1/applicant/search/[name]/[status]/[page]
- Update applicant
- (post) /api/v1/applicant/[id]
- takes a json object of 'info' that includes string 'name', integer 'position_id', string 'status', integer 'created_by'
- (post) /api/v1/applicant/[id]
- Create new applicant
- (post) /api/v1/applicant
- takes a json object of 'info' that includes string 'name', integer 'position_id', string 'status', integer 'created_by'
- (post) /api/v1/applicant
- Delete applicant record
- (delete) /api/v1/applicant/[id] - Secure for only admins
- Fetch all
You can contact me @ wkolcz@gmail.com if you have any questions or issues