The MockX Movie API offers a robust platform for developers to manage movie records, enabling functionalities such as adding new movies, querying existing ones, updating movie details, and deleting records. This guide outlines the API endpoints available for interacting with movie data.
Endpoints Overview
The Movie API includes endpoints for various operations related to movie data management:
GET /: Retrieves all movies.
GET /search: Searches movies based on query parameters.
GET /genres: Fetches a list of all movie genres.
GET /:id: Retrieves a specific movie by ID.
GET /genre/:genreName: Fetches movies by genre.
POST /add: Adds a new movie.
PUT /:id: Updates an entire movie record by ID.
PATCH /:id: Partially updates a movie record by ID.
DELETE /:id: Deletes a movie record by ID.
Get All Movies
Fetch a comprehensive list of movies.
Parameters:
limit: Limits the number of movies returned.
skip: Skips a specified number of movies.
Example Response:
Search Movies
Search for movies based on a query parameter.
Parameters:
q: The search query.
Example Response:
Get Movie Genres
Retrieve a list of unique movie genres.
Example Response:
Get Movie by ID
Fetch detailed information about a specific movie.
Parameters:
id: The unique identifier of the movie.
Example Response:
Get Movies by Genre
Retrieve movies that match a specific genre.
Parameters:
genreName: The name of the genre.
Example Response:
Add New Movie
Add a new movie to the collection.
Body:
Include movie details such as title, year, genre, director, cast, summary, and rating in the request body.
Example Response:
Update Movie by ID
Modify the details of an existing movie.
Parameters:
id: The unique identifier of the movie to be updated.
Body:
Include the movie details to be updated in the request body.
Example Response:
Delete Movie by ID
Remove a movie from the collection.
Parameters:
id: The unique identifier of the movie to be deleted.
Example Response:
MockX offers free, reliable mock APIs for easy testing and development, ideal for developers seeking to enhance their workflow without the complexities of setting up any server.