Skip to main content

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.

The Categorias API allows you to create, read, update, and delete category records in the Cinefinder system.

Get All Categories

curl -X GET http://localhost:8080/categorias
Retrieves a list of all categories in the system.

Response

[]
array
Array of category objects

Response Example

[
  {
    "id": 1,
    "nombre": "Drama"
  },
  {
    "id": 2,
    "nombre": "Comedy"
  }
]

Get Category by Name

curl -X GET http://localhost:8080/categorias/{nombre}
Retrieves a specific category by its name.

Path Parameters

nombre
string
required
The name of the category to retrieve

Response

id
integer
Unique identifier for the category
nombre
string
Name of the category

Response Example

{
  "id": 1,
  "nombre": "Drama"
}

Create Category

curl -X POST http://localhost:8080/categorias \
  -H "Content-Type: application/json" \
  -d '{
    "nombre": "Thriller"
  }'
Creates a new category in the system.

Request Body

nombre
string
required
Name of the category

Response

Returns the created category object with HTTP status 201 (Created).
id
integer
Unique identifier for the newly created category
nombre
string
Name of the category

Response Example

{
  "id": 3,
  "nombre": "Thriller"
}

Update Category

curl -X PUT http://localhost:8080/categorias/{id} \
  -H "Content-Type: application/json" \
  -d '{
    "nombre": "Suspense"
  }'
Updates an existing category.

Path Parameters

id
integer
required
The unique identifier of the category to update

Request Body

nombre
string
required
Name of the category

Response

Returns the updated category object.
id
integer
Unique identifier for the category
nombre
string
Name of the category

Response Example

{
  "id": 3,
  "nombre": "Suspense"
}

Delete Category

curl -X DELETE http://localhost:8080/categorias/{id}
Deletes a category from the system.

Path Parameters

id
integer
required
The unique identifier of the category to delete

Response

type
string
Response type, always “Success”
code
string
HTTP status code (200)
details
string
Success message with the deleted category ID
location
string
Request URI that was called
timestamp
string
Timestamp of the operation

Response Example

{
  "type": "Success",
  "code": "200",
  "details": "la categoría con el id: 3. fue eliminada correctamente.",
  "location": "/categorias/3",
  "timestamp": "2026-03-04T10:30:00"
}

Build docs developers (and LLMs) love