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 Obras API allows you to create, read, update, and delete theatrical work records in the Cinefinder system.

Get All Obras

curl -X GET http://localhost:8080/Obras
Retrieves a list of all theatrical works in the system.

Response

[]
array
Array of obra objects

Response Example

[
  {
    "id": 1,
    "titulo": "Romeo y Julieta",
    "descripcion": "Una tragedia clásica de Shakespeare",
    "duracion": 120,
    "categoria_id": 3
  }
]

Get Obra by Title

curl -X GET http://localhost:8080/Obras/{titulo}
Retrieves a specific theatrical work by its title.

Path Parameters

titulo
string
required
The title of the theatrical work to retrieve

Response

id
integer
Unique identifier for the theatrical work
titulo
string
Title of the theatrical work
descripcion
string
Description of the theatrical work
duracion
integer
Duration of the work in minutes
categoria_id
integer
ID of the category this work belongs to

Response Example

{
  "id": 1,
  "titulo": "Romeo y Julieta",
  "descripcion": "Una tragedia clásica de Shakespeare",
  "duracion": 120,
  "categoria_id": 3
}

Create Obra

curl -X POST http://localhost:8080/Obras \
  -H "Content-Type: application/json" \
  -d '{
    "titulo": "Hamlet",
    "descripcion": "La tragedia de Hamlet, príncipe de Dinamarca",
    "duracion": 180,
    "categoria_id": 3
  }'
Creates a new theatrical work in the system.

Request Body

titulo
string
required
Title of the theatrical work
descripcion
string
required
Description of the theatrical work
duracion
integer
required
Duration of the work in minutes
categoria_id
integer
required
ID of the category this work belongs to

Response

Returns the created obra object with HTTP status 201 (Created).
id
integer
Unique identifier for the newly created theatrical work
titulo
string
Title of the theatrical work
descripcion
string
Description of the theatrical work
duracion
integer
Duration of the work in minutes
categoria_id
integer
ID of the category this work belongs to

Response Example

{
  "id": 2,
  "titulo": "Hamlet",
  "descripcion": "La tragedia de Hamlet, príncipe de Dinamarca",
  "duracion": 180,
  "categoria_id": 3
}

Update Obra

curl -X PUT http://localhost:8080/Obras/{id} \
  -H "Content-Type: application/json" \
  -d '{
    "titulo": "Hamlet",
    "descripcion": "Updated description",
    "duracion": 180,
    "categoria_id": 3
  }'
Updates an existing theatrical work.

Path Parameters

id
integer
required
The unique identifier of the theatrical work to update

Request Body

titulo
string
required
Title of the theatrical work
descripcion
string
required
Description of the theatrical work
duracion
integer
required
Duration of the work in minutes
categoria_id
integer
required
ID of the category this work belongs to

Response

Returns the updated obra object.
id
integer
Unique identifier for the theatrical work
titulo
string
Title of the theatrical work
descripcion
string
Description of the theatrical work
duracion
integer
Duration of the work in minutes
categoria_id
integer
ID of the category this work belongs to

Delete Obra

curl -X DELETE http://localhost:8080/Obras/{id}
Deletes a theatrical work from the system.

Path Parameters

id
integer
required
The unique identifier of the theatrical work to delete

Response

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

Response Example

{
  "type": "Success",
  "code": "200",
  "details": "la obra con el id: 1. fue eliminada correctamente.",
  "location": "/Obras/1",
  "timestamp": "2026-03-04T10:30:00"
}

Build docs developers (and LLMs) love