tvpl.api

<back to all web services

LoginHistoryRequest

Lấy lịch sử đăng nhập

Requires Authentication
Required role:super-admin
The following routes are available for this service:
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 .jsv suffix or ?format=jsv

HTTP + JSV

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/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	data: 
	[
		{
			failedLoginCount: 0,
			id: 0,
			userId: 0,
			userName: String,
			ipAddress: String,
			deviceInfo: String,
			loginStatus: String,
			failReason: String,
			provider: String
		}
	],
	totalRecords: 0,
	code: 0,
	message: String
}