Skip to content

Search Log Files by Name #363

Description

@ChernyavckiiPavlo

Description

Implement a REST endpoint for searching log files by their full or partial name.

The search result must support pagination.

Endpoint

GET /api/admin/log-files/search

Query Parameters
name — full or partial file name;
page — page number, starting from 0;
size — number of files per page.
Request Example

GET /api/admin/log-files/search?name=application&page=0&size=20

Response Data

For each matching file, return:

fileName;
size;
lastModified.

Also return pagination metadata:

page;
size;
totalElements;
totalPages.
Acceptance Criteria
the endpoint is accessible only to administrators;
the search is performed by file name;
partial name matching is supported;
the search is case-insensitive;
the result supports pagination;
only files from the allowed log directory are returned;
an empty list is returned when no matching files are found;
an empty name parameter returns HTTP 400;
the name value must not allow file system paths;
values containing ../, .., /, or \ are rejected.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions