Files
bookhoard/bruno/user/admin/List Users.bru
T
john-okeefe 36e03f89b6 test(bruno): add system settings API tests and update list users test
System Settings Bruno Tests (new):
- bruno/system/get-scan-settings.bru
- bruno/system/update-scan-settings.bru
- Test GET endpoint for retrieving system scan settings
- Test PUT endpoint for updating system scan settings
- Include admin authentication requirements
- Document response structures

List Users Bruno Test (update):
- bruno/user/admin/List Users.bru
- Add max_devices to response documentation
- Add device_count to response documentation
- Update feature descriptions

These Bruno tests provide API contract verification for the new
system settings endpoints and document the enhanced user list response.
2026-02-09 20:12:21 -05:00

100 lines
2.6 KiB
Plaintext

meta {
name: List Users
type: http
seq: 5
}
get {
url: {{base_url}}/api/auth/users
body: none
auth: inherit
}
settings {
encodeUrl: true
timeout: 0
}
docs {
## List Users
Retrieves a list of all users with complete user information.
**Method:** GET
**Endpoint:** /api/auth/users
**Authentication:** Required (Admin only)
**Response:** Array of user objects with complete information:
- `id` (string): User ID (UUID)
- `email` (string): Email address
- `username` (string): Username
- `first_name` (string): First name (empty if not set)
- `last_name` (string): Last name (empty if not set)
- `role` (string): User role ("user" or "admin")
- `theme` (string): Theme preference (empty if default)
- `max_devices` (integer): Maximum number of devices allowed
- `device_count` (integer): Current number of registered devices
- `created_at` (string): Creation timestamp (ISO 8601)
- `updated_at` (string): Last update timestamp (ISO 8601)
**Status Codes:**
- 200: Success
- 401: Unauthorized
- 403: Forbidden (admin access required)
**Features:**
- Admin-only endpoint with complete user information
- Returns first_name, last_name, role, theme fields
- Includes device limits and current device count
- Useful for user management interfaces
}
get {
url: {{base_url}}/api/auth/users
body: none
auth: inherit
}
settings {
encodeUrl: true
timeout: 0
}
docs {
## List Users (Admin)
Retrieves a list of all users with complete user information.
**Method:** GET
**Endpoint:** /api/auth/users
**Authentication:** Required (Admin only)
**Response:** Array of user objects with complete information:
- `id` (string): User ID (UUID)
- `email` (string): Email address
- `username` (string): Username
- `first_name` (string): First name (empty if not set)
- `last_name` (string): Last name (empty if not set)
- `role` (string): User role ("user" or "admin")
- `theme` (string): Theme preference (empty if default)
- `max_devices` (integer): Maximum number of devices allowed
- `device_count` (integer): Current number of registered devices
- `created_at` (string): Creation timestamp (ISO 8601)
- `updated_at` (string): Last update timestamp (ISO 8601)
**Status Codes:**
- 200: Success
- 401: Unauthorized
- 403: Forbidden (admin access required)
**Enhanced Features:**
- Now admin-only endpoint (moved from public to protected admin group)
- Returns complete user profile information including names and role
- Includes device limits and current device count for monitoring
- Useful for comprehensive admin user management
}