Giter Site home page Giter Site logo

vimigo-rest-api-assessment's Introduction

Vimigo Rest API Assessment

Requirements

  1. You are required to do CRUD functions using User Model ([POST]/login & [POST]/register is not considered as part of CRUD)

  2. The CRUD functions need to be REST API

  3. Your API can only be accessed if the user is authenticated through Laravel Passport

  4. All of your inputs need to be validated. You need to use Laravel Form Request Validation

  5. Your [GET]/api/users able to filter by name and email, and the response must have pagination.

  6. when retrieving the data, only need to show name and email using Laravel API Resource.

  7. You also need to have an API to import excel/csv files to do bulk Create, Update and Delete users.

  8. The project progress can be tracked using any version-control system (e.g: Upload in GitHub)

  9. you MUST save all of the requests and responses as a Postman collection, and include the Postman JSON link in your README.md

Installation

  • Clone the repository with git clone or download zip file
  • Copy .env.example file to .env and edit database credentials there
  • Run composer install
  • Run php artisan key:generate
  • Run php artisan migrate --seed
  • Run php artisan passport:client --personal then copy the client_id and client_secret to .env
  • Run php artisan serve
  • Launch the main URL

Postman Collection

Postman JSON link

Endpoint

Method Resources Parameter Description Auth
POST api/register name, email, password, password_confirmation Register a user to login No
POST api/login email, password Login to get personal access token No
POST api/logout null Logout a user and revoke personal access token Yes
POST api/users name, email,password Create a users Yes
GET api/users null Get all users (name, email) Yes
PUT api/users/{user} name, email, password Update a user Yes
DELETE api/users/{user} null Delete a user by id Yes
GET api/users/{user} null Get a user by id Yes
POST api/users/import file Import excel/csv to do bulk Create, Update, and Delete users Yes

vimigo-rest-api-assessment's People

Contributors

dxhxm88 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.