Endpoint
Retrieves all users registered in the notification system. This endpoint returns the complete user list including their notification preferences.
Response
Indicates if the request was successful
Array of user objects
Unique user identifier (UUID)
Firebase Cloud Messaging token for push notifications (optional)
User notification preferences
Whether user wants email notifications
Whether user wants push notifications
ISO 8601 timestamp of user creation
ISO 8601 timestamp of last update
Example request
curl -X GET http://localhost:8001/api/v1/users
const response = await fetch('http://localhost:8001/api/v1/users', {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
});
const users = await response.json();
import requests
response = requests.get('http://localhost:8001/api/v1/users')
users = response.json()
Example response
[
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "John Doe",
"email": "[email protected]",
"push_token": "fcm_token_abc123",
"preferences": {
"email": true,
"push": true
},
"created_at": "2024-03-01T10:00:00Z",
"updated_at": "2024-03-01T10:00:00Z"
},
{
"id": "987f6543-e21b-45d6-a789-123456789abc",
"name": "Jane Smith",
"email": "[email protected]",
"push_token": null,
"preferences": {
"email": true,
"push": false
},
"created_at": "2024-03-02T14:30:00Z",
"updated_at": "2024-03-02T14:30:00Z"
}
]
Use cases
- Display user management dashboard
- Export user data for analytics
- Verify user registrations
- Audit notification preferences across all users
This endpoint returns all users without pagination. For production systems with many users, consider implementing pagination to improve performance.