This endpoint searches the in-memoryDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/titobrian97/Prueba-tecnica-ts-node---gestion-de-csv/llms.txt
Use this file to discover all available pages before exploring further.
usersData array — populated by a prior POST /api/files upload — and returns every row that contains the search term as a substring in any of its column values. Matching is case-insensitive, so it doesn’t matter how the query is capitalised. If no rows match, the endpoint still returns HTTP 200 with an empty data array.
Endpoint
Query Parameters
The search term to match against. The server performs a case-insensitive substring comparison across all column values in every stored row. A row is included in the response if at least one column value contains the query string.
Example Requests
Success Response — HTTP 200
The server always returns HTTP200 when the q parameter is present, regardless of whether any rows matched.
Array of row objects whose column values match the search query. Each object has the same shape as the rows returned by
POST /api/files — keys are the CSV column headers and all values are strings. Returns an empty array [] when no rows match the query.Example Response for ?q=carlos
Filtering Logic
The filter is applied using the following expression taken directly fromserver.ts:
Object.values(row) collects every column value for a given row, and .some(...) returns true as soon as any single value passes the test. The test lowercases both the stored value and the incoming query before calling .includes(), which means:
- The match is case-insensitive —
"Carlos","carlos", and"CARLOS"are all equivalent. - The match is a substring — querying
"car"would match"Carlos"as well as any other value containing those three characters. - The match spans all columns — a query of
"mexico"can match on thepaiscolumn, theciudadcolumn, a phone prefix, or any other column that happens to contain that string.
Error Response — HTTP 500
Missing q parameter
Missing q parameter
Returned when the request is made without providing the
q query parameter.If no CSV file has been uploaded yet — or if the server was restarted since the last upload —
usersData is an empty array. Every search query will return {"data": []} until a file is successfully uploaded via POST /api/files.