URL: api/admin/get-users-list
Method: GET
Description : Fetches list of users
Parameters:
| Parameter | Type | Optional/Required | Description |
| search-query | string | Optional | Search Query |
| sort-order | string | Optional | ‘asc’ or ‘desc’ |
| sort-field | string | Optional | User’s field based on which sorting will be done. By default, it is set to id. |
| limit | integer | Optional | Number of records needed in a page. |
| page | integer | Optional | Page number by default, it is set to 1. |
| strict-search | integer | Optional | 1 or 0, strictly searches for email or username, when strict-search is set to 1 |
| active | integer | Optional | Active value 1, deactivate value 0 |
| roles | string | Optional | Agent roles admin, agent, user |
| ban | integer | Optional | Ban value 1, not ban value 0 |
| dept-ids | array | Optional | Department ids |
| team-ids | array | Optional | Team ids |
Success Response :
{
"success": true,
"data": {
"current_page": 2,
"first_page_url": "http://localhost:8000/api/admin/get-users-list?page=1",
"from": 3,
"last_page": 4,
"last_page_url": "http://localhost:8000/api/admin/get-users-list?page=4",
"next_page_url": "http://localhost:8000/api/admin/get-users-list?page=3",
"path": "http://localhost:8000/api/admin/get-users-list",
"per_page": 2,
"prev_page_url": "http://localhost:8000/api/admin/get-users-list?page=1",
"to": 4,
"total": 7,
"users": [
{
"id": 119,
"role": "agent",
"user_name": "sigmund41",
"email": "tom19@example.com",
"active": 1,
"email_verify": "1",
"mobile_otp_verify": "1",
"ban": 0,
"is_delete": 0,
"last_login_at": "November 29, 2018, 1:31 pm",
"name": "Erin Murphy",
"phone": "8756436578"
},
{
"id": 120,
"role": "agent",
"user_name": "allan.ferry",
"email": "max73@example.org",
"active": 1,
"email_verify": "1",
"mobile_otp_verify": "1",
"ban": 0,
"is_delete": 0,
"last_login_at": "November 29, 2018, 1:31 pm",
"name": "Jimmy Feil",
"phone": " 9845724567"
}
]
}
}
Error Response :
{
"success":false,
"Message":"No data available in table"
}