GET /api/recetas/usuario/[id]
Returns all recipes authored by a specific user, along with that user’s display name. Results are sorted by creation date descending.
No authentication is required to call this endpoint.
Unlike GET /api/recetas, this endpoint does not filter by oculta. All recipes for the user are returned, including hidden ones. Apply visibility filtering in your client if needed.
Path parameters
UUID of the user whose recipes you want to retrieve.
Response fields
All recipes authored by the user, ordered by fecha_creacion descending. Show Recipe object properties
Unique UUID of the recipe.
Short description of the recipe.
Preparation and cooking time.
JSON-encoded array of ingredient strings.
JSON-encoded array of step strings.
URL of the recipe image, or null if none.
Whether the recipe is hidden from public listings.
ISO 8601 timestamp of when the recipe was created.
UUID of the recipe’s author.
Nested author profile. Display name of the author.
URL of the author’s avatar image.
Display name of the user. Falls back to "Usuario Desconocido" if no profile is found.
Example request
curl -X GET "https://example.com/api/recetas/usuario/f1e2d3c4-b5a6-7890-abcd-ef0987654321"
Example response
{
"recetas" : [
{
"id" : "a1b2c3d4-e5f6-7890-abcd-ef1234567890" ,
"titulo" : "Pasta al pesto" ,
"descripcion" : "Una receta clásica italiana con albahaca fresca." ,
"tiempo" : "20 minutos" ,
"dificultad" : "Fácil" ,
"ingredientes" : "[ \" pasta \" , \" albahaca \" , \" ajo \" ]" ,
"pasos" : "[ \" Cocer la pasta. \" , \" Mezclar con el pesto. \" ]" ,
"imagen_url" : "https://example.com/images/pasta.jpg" ,
"oculta" : false ,
"fecha_creacion" : "2024-03-15T10:30:00.000Z" ,
"autor_id" : "f1e2d3c4-b5a6-7890-abcd-ef0987654321" ,
"perfiles" : {
"nombre" : "María García" ,
"avatar_url" : "https://example.com/avatars/maria.jpg"
}
}
],
"username" : "María García"
}
Error responses
Status Condition 400Missing id path parameter or database error 500Unexpected server error