A REST API for the "myFlix" application that interacts with a database, providing users with access to information about different movies, directors, and genres. Users will be able to sing up, update their personal information, and create a list of their favorite movies.
Business Logic | URL | HTTP Method | Request body data format | Response body data format |
---|---|---|---|---|
Get list of all movies | /movies | GET | None | A JSON object holding data about all the movies |
Get data of single movie by title | /movies/[Movie Title] | GET | None |
A JSON object holding data about a single movie, containing title,description,genre,and director.
Example: {
"Title": "It", |
Get data of genre by name | /movies/genres/[Genre Name] | GET | None | A JSON object holding data about the specified genre |
Get data about a director by name | /movies/directors/[Director Name] | GET | None | A JSON object containing data about the requested director |
Register a user | /users | POST |
A JSON object holding data about the user being added.
Example: {
"Username": "Lucas", |
A JSON object holding data about the newly added user with an assigned ID.
Example: {
"Username":"Lucas", |
Update user info(by username) | /users/[User Name] | PUT | {"Email": "newemail@email.com"} | A JSON object containing the user's data with the updated information |
Add a movie to a user's list of favorites | /users/[Username]/movies/[Movie ID] | POST | None | A text message indicating whether a movie was successfully added to user's favorites |
Remove a movie from a user's list of favorites | /users/[Username]/movies/[Movie ID] | DELETE | None | A text message indicating whether a movie was successfully removed from user's favorites |
Deregister a user(remove user) | /users/[User Name] | DELETE | None | A text message indicating whether the user was successfully removed |