Users
LIVEEndpoints for mock user profiles. Filter by role or country, search by name, username, or email.
Endpoints
- GETPOSTList or create
- GETPATCHDELETERead, update, or delete one/api/users/:id
- GETSearch
- GETFilter by role
Query params
| Param | Description | Example |
|---|---|---|
| page | Page number · default 1 | page=2 |
| limit | Page size · default 12 · max 50 | limit=12 |
| search | Name, username, email, company, city | search=ava |
| role | admin · member · guest | role=admin |
| country | Filter by country | country=Germany |
| sort | createdAt · name · username | sort=name |
| order | asc · desc | order=asc |
| lang | Pass fa for Persian text · omit for English | lang=fa |
| delay | Artificial wait in ms · max 5000 | delay=800 |
| status | Force error HTTP status · 400–599 | status=500 |
Request
1import axios from 'axios';2 3const { data } = await axios.get('/api/users', {4 params: { limit: 12 },5});6console.log(data.data, data.pagination);Response
1{2 "data": [3 {4 "id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",5 "name": "Ava Chen",6 "username": "avachen",7 "email": "ava.chen@example.com",8 "role": "admin",9 "city": "San Francisco",10 "country": "United States"11 }12 ],13 "pagination": {14 "page": 1,15 "limit": 12,16 "total": 24,17 "totalPages": 218 }19}