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 of obra objects Unique identifier for the theatrical work
Title of the theatrical work
Description of the theatrical work
Duration of the work in minutes
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
}
]
Get Obra by Title
curl -X GET http://localhost:8080/Obras/{titulo}
Retrieves a specific theatrical work by its title.
Path Parameters
The title of the theatrical work to retrieve
Response
Unique identifier for the theatrical work
Title of the theatrical work
Description of the theatrical work
Duration of the work in minutes
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
Title of the theatrical work
Description of the theatrical work
Duration of the work in minutes
ID of the category this work belongs to
Response
Returns the created obra object with HTTP status 201 (Created).
Unique identifier for the newly created theatrical work
Title of the theatrical work
Description of the theatrical work
Duration of the work in minutes
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
The unique identifier of the theatrical work to update
Request Body
Title of the theatrical work
Description of the theatrical work
Duration of the work in minutes
ID of the category this work belongs to
Response
Returns the updated obra object.
Unique identifier for the theatrical work
Title of the theatrical work
Description of the theatrical work
Duration of the work in minutes
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
The unique identifier of the theatrical work to delete
Response
Response type, always “Success”
Success message with the deleted obra ID
Request URI that was called
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"
}