URL: api/login/info/{userId?}
Method: GET
Description : Gets the list of all the login logs for a user along with IP , browser and device info.
Path Parameter:
Parameter | Type | Required/Optional | Description |
userId | integer | Optional | The id of the user |
Success Response:
{ "success": true, "data": { "allow_unrecognized_login": 1, "current_page": 1, "data": [ { "id": 311, "authenticatable_type": "App\\User", "authenticatable_id": 1, "ip_address": "127.0.0.1", "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:89.0) Gecko/20100101 Firefox/89.0", "browser": "Firefox (v89)", "platform": "Mac (v10.15)", "device": "Apple (Mac)", "login_at": "2021-06-10 10:50:55", "logout_at": null, "session_token": "tJPZurYMuMYSOrmV2Jjc5FYugljQaeWunPd51nj1" }, { "id": 310, "authenticatable_type": "App\\User", "authenticatable_id": 1, "ip_address": "127.0.0.1", "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:89.0) Gecko/20100101 Firefox/89.0", "browser": "Firefox (v89)", "platform": "Mac (v10.15)", "device": "Apple (Mac)", "login_at": "2021-06-10 10:48:39", "logout_at": null, "session_token": "3V3qxY1QsLanZRw6FpVHM0JsAIqSCvyMcuHntyDB" } ], "first_page_url": "http://faveo.helpdesk/api/login/info/1?page=1", "from": 1, "last_page": 1, "last_page_url": "http://faveo.helpdesk/api/login/info/1?page=1", "next_page_url": null, "path": "http://faveo.helpdesk/api/login/info/1", "per_page": 10, "prev_page_url": null, "to": 2, "total": 2 } }
Error Response:
{ success: false message: "Permission denied. You don't have permission to perform this action" }