Skip to main content
GET
/
api
/
tickets
/
usuario
/
{usuarioId}
Get Tickets by User
curl --request GET \
  --url https://api.example.com/api/tickets/usuario/{usuarioId}
{
  "tickets": [
    {
      "IdTicket": "<string>",
      "Codigo": "<string>",
      "Titulo": "<string>",
      "Descripcion": "<string>",
      "Area": "<string>",
      "Prioridad": "<string>",
      "Estado": "<string>",
      "FechaCreacion": "<string>",
      "FechaActualizacion": "<string>"
    }
  ]
}

Authentication

This endpoint requires JWT authentication. Include the bearer token in the Authorization header.
Authentication is currently commented out in the controller but should be enabled in production.

Path Parameters

usuarioId
string
required
The UUID of the user whose tickets you want to retrieve

Response

Returns an array of ticket objects created by the specified user.
tickets
array
Array of ticket objects

Example Request

curl -X GET https://api.example.com/api/tickets/usuario/3fa85f64-5717-4562-b3fc-2c963f66afa6 \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

Example Response

200 - Success
[
  {
    "IdTicket": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
    "Codigo": "TKT-2024-001234",
    "Titulo": "Cannot access dashboard",
    "Descripcion": "I am unable to log into the dashboard. The page returns a 500 error.",
    "Area": "Technical Support",
    "Prioridad": "High",
    "Estado": "Open",
    "FechaCreacion": "2024-03-15T10:30:00Z",
    "FechaActualizacion": "2024-03-15T10:30:00Z"
  },
  {
    "IdTicket": "9e5f8891-9647-62fg-d5he-4e295f3b12cg9",
    "Codigo": "TKT-2024-001190",
    "Titulo": "Password reset not working",
    "Descripcion": "The password reset email is not being received.",
    "Area": "Technical Support",
    "Prioridad": "Medium",
    "Estado": "Resolved",
    "FechaCreacion": "2024-03-10T08:15:00Z",
    "FechaActualizacion": "2024-03-11T16:45:00Z"
  }
]
401 - Unauthorized
{
  "type": "https://tools.ietf.org/html/rfc7235#section-3.1",
  "title": "Unauthorized",
  "status": 401
}
If the user has no tickets, this endpoint returns an empty array with a 200 status code.

Build docs developers (and LLMs) love