tvpl.api

<back to all web services

GetHeadOfDeparment

Requires Authentication
The following routes are available for this service:
GET/users/head-of-department
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

        Public Partial Class AllUserResponse
            Public Sub New()
                Users = New List(Of UserProfile)
            End Sub

            Public Overridable Property Users As List(Of UserProfile)
            Public Overridable Property Code As Integer
            Public Overridable Property Message As String
            Public Overridable Property TotalCount As Integer
        End Class

        Public Partial Class GetHeadOfDeparment
            Public Overridable Property IsParty As Boolean
        End Class
    End Namespace

    Namespace tvpl.data.Models

        Public Partial Class UserLogin
            <Required>
            Public Overridable Property Name As String
        End Class

        Public Partial Class UserProfile
            Inherits UserLogin
            Public Sub New()
                Roles = New List(Of Integer)
            End Sub

            Public Overridable Property Id As Integer
            Public Overridable Property FullName As String
            Public Overridable Property Email As String
            Public Overridable Property DepartmentId As Nullable(Of Integer)
            Public Overridable Property PartyGroupId As Nullable(Of Integer)
            Public Overridable Property Avatar As String
            Public Overridable Property Telephone As String
            Public Overridable Property Birthday As Nullable(Of Date)
            Public Overridable Property CreatedAt As Nullable(Of Date)
            Public Overridable Property UpdatedAt As Nullable(Of Date)
            Public Overridable Property FailedLoginCount As Integer
            <Ignore>
            Public Overridable Property Roles As List(Of Integer)

            Public Overridable Property LastLoginDate As Nullable(Of Date)
        End Class
    End Namespace
End Namespace

VB.NET GetHeadOfDeparment DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other

HTTP + OTHER

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /users/head-of-department HTTP/1.1 
Host: etc-api.vsmlab.vn 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"users":[{"id":0,"fullName":"String","email":"String","departmentId":0,"partyGroupId":0,"avatar":"String","telephone":"String","birthday":"0001-01-01T00:00:00.0000000+07:06","createdAt":"0001-01-01T00:00:00.0000000+07:06","updatedAt":"0001-01-01T00:00:00.0000000+07:06","failedLoginCount":0,"roles":[0],"lastLoginDate":"0001-01-01T00:00:00.0000000+07:06","name":"String"}],"code":0,"message":"String","totalCount":0}