Skip to main content

GET /api/modules/search

Searches modules by name with pagination support. Returns a paginated response containing matching modules.

Authentication

Requires authentication with valid JWT token.

Query Parameters

name
string
Optional filter to search modules by name (partial match)
page
integer
default:"0"
Page index (0-based)
size
integer
default:"10"
Number of items per page

Response

content
array
Array of module objects matching the search criteria
id
UUID
Unique identifier for the module
name
string
Module name
path
string
Module path
icon
string
Module icon identifier
status
string
Module status (e.g., ACTIVE, INACTIVE)
pageNumber
integer
Current page number (0-based)
pageSize
integer
Number of items per page
totalElements
long
Total number of elements across all pages
totalPages
integer
Total number of pages
isLast
boolean
Indicates if this is the last page

Status Codes

  • 200 OK - Search completed successfully
  • 400 Bad Request - Invalid pagination parameters

Example Request

curl -X GET "https://api.example.com/api/modules/search?name=User&page=0&size=10" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

Example Response

{
  "content": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "name": "User Management",
      "path": "/users",
      "icon": "users-icon",
      "status": "ACTIVE"
    },
    {
      "id": "880e8400-e29b-41d4-a716-446655440003",
      "name": "User Profile",
      "path": "/profile",
      "icon": "profile-icon",
      "status": "ACTIVE"
    }
  ],
  "pageNumber": 0,
  "pageSize": 10,
  "totalElements": 2,
  "totalPages": 1,
  "isLast": true
}

Search Without Filter

Omit the name parameter to retrieve all modules with pagination:
curl -X GET "https://api.example.com/api/modules/search?page=0&size=20" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

Error Response

{
  "timestamp": "2026-03-04T10:30:00Z",
  "status": 400,
  "error": "Bad Request",
  "message": "Invalid pagination parameters",
  "path": "/api/modules/search"
}

Build docs developers (and LLMs) love