This function returns the IP address of the user who most recently logged in.
uapi --output=jsonpretty \ --user=username \ LastLogin \ get_last_or_current_logged_in_ip
{- "apiversion": 3,
- "func": "get_last_or_current_logged_in_ip",
- "module": "LastLogin",
- "result": {
- "data": [
- "192.168.0.1"
], - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}