Documentation Page - myFlix API


To build the server-side component of a "movies" web application.

The web application will provide users with access to information about different movies, directors, and genres.

Users will be able to sign up, update their personal information, and create a list of their favorite movies.


Essential Features

Endpoints for API

Business Logic URL HTTP Method Query Parameters Request body data format Response body data format
Return data of all movies http://localhost:8080/movies GET /movies A JSON File with all movies
Return data (description, genre, director, image URL) http://localhost:8080/movies/Inception GET /movies/:title A JSON File with movie details about a single movie "Inception"
Return data about a genre http://localhost:8080/movies/genre/Thiller GET /movies/genre/:genreName Return data about a genre (descripition) by name/title ("thriller")
Return data about a Director http://localhost:8080/movies/directors/Christopher%20Nolan GET /movies/director/:directorName Return data about a Director(bio, birth year, death year) by name
Return data of all users http://localhost:8080/users GET /users A JSON File with all users
New Users Register http://localhost:8080/users POST /users { "Username" : "flores", "Password" : "testpassword123", "Email" : "flores@example.com", "Birthday" : "01/15/94" } A JSON Object holding data about a new user added. Including an ID: { "Username": "flores", "Password": "testpassword123", "Email": "flores@example.com", "Birthday": "1994-01-15T08:00:00.000Z", "FavoriteMovies": [], "_id": "6761cdfa94af0dc4ea8a82e0", "__v": 0 }
Update User Name by Name http://localhost:8080/user/flores PUT /user/:Username { "Username" : "flores", "Password" : "password", "Email" : "flores@example.com", "Birthday" : "01/15/94" }

Allow users to update their user info (username)

{ "_id": "6761cdfa94af0dc4ea8a82e0", "Username": "flores", "Password": "password", "Email": "flores@example.com", "Birthday": "1994-01-15T08:00:00.000Z", "FavoriteMovies": [], "__v": 0 }
Allow users to add a movie to their list of favorites http://localhost:8080/users/flores/movies/674f6e99130c43c583893bfe POST /user/:Username/movies/MovieID { "Username" : "flores", "Password" : "password", "Email" : "flores@example.com", "Birthday" : "01/15/94" } { "_id": "6761cdfa94af0dc4ea8a82e0", "Username": "flores", "Password": "password", "Email": "flores@example.com", "Birthday": "1994-01-15T08:00:00.000Z", "FavoriteMovies": [ "674f6e99130c43c583893bfe" ], "__v": 0 }
Allow users to remove a movie from their list of favorites-- http://localhost:8080/users/flores/movies/674f6e99130c43c583893bfe DELETE /user/:Username/movies/MovieID { "Username" : "flores", "Password" : "password", "Email" : "flores@example.com", "Birthday" : "01/15/94" } { "_id": "6761cdfa94af0dc4ea8a82e0", "Username": "flores", "Password": "password", "Email": "flores@example.com", "Birthday": "1994-01-15T08:00:00.000Z", "FavoriteMovies": [], "__v": 0 }
Allow existing users to deregister http://localhost:8080/users/flores DELETE /user/:Username { "Username" : "flores", "Password" : "testpassword123", "Email" : "flores@example.com", "Birthday" : "01/15/94" } flores was deleted.