| Required role: | super-admin |
| GET | /login-history |
|---|
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports tvpl.api.ServiceModel
Imports tvpl.data.Models
Namespace Global
Namespace tvpl.api.ServiceModel
'''<Summary>
'''Lấy lịch sử đăng nhập
'''</Summary>
Public Partial Class LoginHistoryRequest
Public Overridable Property UserId As Nullable(Of Integer)
Public Overridable Property UserName As String
Public Overridable Property StartDate As Nullable(Of Date)
Public Overridable Property EndDate As Nullable(Of Date)
Public Overridable Property Page As Integer
Public Overridable Property Limit As Integer
End Class
Public Partial Class LoginHistoryRespnse
Implements IResponseRequest
Public Sub New()
Data = New List(Of UserLoginHistoryDto)
End Sub
Public Overridable Property Data As List(Of UserLoginHistoryDto)
Public Overridable Property TotalRecords As Integer
Public Overridable Property Code As Integer
Public Overridable Property Message As String
End Class
End Namespace
Namespace tvpl.data.Models
Public Partial Class UserLoginHistory
Public Overridable Property Id As Integer
Public Overridable Property UserId As Integer
<StringLength(150)>
Public Overridable Property UserName As String
<StringLength(45)>
Public Overridable Property IPAddress As String
<StringLength(500)>
Public Overridable Property DeviceInfo As String
<StringLength(50)>
Public Overridable Property LoginStatus As String
<StringLength(500)>
Public Overridable Property FailReason As String
<Required>
Public Overridable Property CreatedAt As Date
Public Overridable Property Provider As String
End Class
Public Partial Class UserLoginHistoryDto
Inherits UserLoginHistory
Public Overridable Property FailedLoginCount As Nullable(Of Integer)
End Class
End Namespace
End Namespace
VB.NET LoginHistoryRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /login-history HTTP/1.1 Host: etc-api.vsmlab.vn Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"data":[{"failedLoginCount":0,"id":0,"userId":0,"userName":"String","ipAddress":"String","deviceInfo":"String","loginStatus":"String","failReason":"String","createdAt":"0001-01-01T00:00:00.0000000+07:06","provider":"String"}],"totalRecords":0,"code":0,"message":"String"}