Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Gabo-gutierrez/Cinefinder/llms.txt
Use this file to discover all available pages before exploring further.
Quickstart Guide
This guide will help you set up and run Cinefinder API locally, then make your first API calls to manage movies, artists, and events.Prerequisites
Before you begin, ensure you have the following installed:- Java 21 or higher (Download)
- MySQL 8.0+ (Download)
- Maven 3.6+ (or use the included Maven wrapper)
- Git for cloning the repository
- cURL or Postman for testing API endpoints
Installation
Step 1: Clone the Repository
Step 2: Set Up MySQL Database
Create the database and populate it with initial data:CINES database with:
- 12 categories (Action, Comedy, Drama, etc.)
- 12 artists (actors, singers, dancers)
- 12 movies
- 12 theater works
- 12 urban events
- Artist participations
Step 3: Configure Database Connection
The default configuration insrc/main/resources/application.properties is:
username and password if your MySQL configuration differs.
Step 4: Build the Application
Using the Maven wrapper (recommended):Step 5: Run the Application
http://localhost:8080
You should see output indicating the application started successfully:
Your First API Calls
Now that the API is running, let’s make some requests!List All Movies
Retrieve all movies in the database:Get a Movie by Title
Search for a specific movie:Create a New Movie
Add a new movie to the catalog:Update a Movie
Modify an existing movie:Delete a Movie
Remove a movie from the catalog:Working with Artists
List All Artists
Get Artist by DNI
Create a New Artist
Working with Urban Events
List All Events
Create a New Event
Working with Categories
List All Categories
Get Category by Name
Create a New Category
Working with Theater Works
List All Theater Works
Get Work by Title
API Endpoints Summary
Here’s a complete overview of available endpoints:| Resource | Method | Endpoint | Description |
|---|---|---|---|
| Movies | GET | /peliculas | List all movies |
| GET | /peliculas/{titulo} | Get movie by title | |
| POST | /peliculas | Create new movie | |
| PUT | /peliculas/{id} | Update movie | |
| DELETE | /peliculas/{id} | Delete movie | |
| Artists | GET | /artistas | List all artists |
| GET | /artistas/{dni} | Get artist by DNI | |
| POST | /artistas | Create new artist | |
| PUT | /artistas/{dni} | Update artist | |
| DELETE | /artistas/{dni} | Delete artist | |
| Events | GET | /eventosUrbanos | List all events |
| GET | /eventosUrbanos/{titulo} | Get event by title | |
| POST | /eventosUrbanos | Create new event | |
| PUT | /eventosUrbanos/{id} | Update event | |
| DELETE | /eventosUrbanos/{id} | Delete event | |
| Works | GET | /Obras | List all theater works |
| GET | /Obras/{titulo} | Get work by title | |
| POST | /Obras | Create new work | |
| PUT | /Obras/{id} | Update work | |
| DELETE | /Obras/{id} | Delete work | |
| Categories | GET | /categorias | List all categories |
| GET | /categorias/{nombre} | Get category by name | |
| POST | /categorias | Create new category | |
| PUT | /categorias/{id} | Update category | |
| DELETE | /categorias/{id} | Delete category |
Testing with Postman
If you prefer using Postman:- Create a new collection called “Cinefinder API”
- Set the base URL to
http://localhost:8080 - Add requests for each endpoint
- For POST/PUT requests, set
Content-Type: application/jsonheader - Use the JSON examples provided above in the request body
Common HTTP Status Codes
- 200 OK: Request successful
- 201 Created: Resource created successfully
- 404 Not Found: Resource doesn’t exist
- 400 Bad Request: Invalid request data
- 500 Internal Server Error: Server error
Troubleshooting
Port Already in Use
If port 8080 is already in use, change it inapplication.properties:
Database Connection Errors
Ensure MySQL is running:application.properties.
Build Failures
Clean the Maven cache and rebuild:Next Steps
Now that you’re up and running:- Explore the Movies API documentation
- Learn about the architecture
- Understand the database schema
- Check out error handling best practices