GET /api/permissions/search
Performs a paginated search for permissions with optional filtering by name. Supports partial name matching.
Authentication
This endpoint requires authentication with a valid Bearer token.
Query Parameters
Optional filter for partial name matching. Returns permissions whose name contains this value.
Zero-based page number for pagination.
Number of elements per page. Determines the page size for pagination.
Response
Array of permission objects matching the search criteriaUnique identifier of the permission
The name of the permission
Description of the permission
Current status of the permission
Current page number (zero-based)
Number of elements per page
Total number of elements matching the search criteria
Total number of pages available
Indicates whether this is the last page
Status Codes
- 200 OK - Search completed successfully
- 400 Bad Request - Invalid query parameters
Example Request
curl -X GET "https://api.example.com/api/permissions/search?name=user&page=0&size=10" \
-H "Authorization: Bearer YOUR_TOKEN"
Example Response
{
"content": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "users:read",
"description": "Permission to read user data",
"status": "ACTIVE"
},
{
"id": "660e8400-e29b-41d4-a716-446655440001",
"name": "users:write",
"description": "Permission to create and update user data",
"status": "ACTIVE"
}
],
"pageNumber": 0,
"pageSize": 10,
"totalElements": 2,
"totalPages": 1,
"isLast": true
}
Search Without Filter
You can retrieve all permissions with pagination by omitting the name parameter:
curl -X GET "https://api.example.com/api/permissions/search?page=0&size=20" \
-H "Authorization: Bearer YOUR_TOKEN"
Error Response
{
"timestamp": "2026-03-04T10:30:00Z",
"status": 400,
"error": "Bad Request",
"message": "Parámetros inválidos",
"path": "/api/permissions/search"
}