| GET | /users/head-of-department |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class GetHeadOfDeparment
{
public Boolean isParty = null;
public Boolean getIsParty() { return isParty; }
public GetHeadOfDeparment setIsParty(Boolean value) { this.isParty = value; return this; }
}
public static class AllUserResponse
{
public ArrayList<UserProfile> users = null;
public Integer code = null;
public String message = null;
public Integer totalCount = null;
public ArrayList<UserProfile> getUsers() { return users; }
public AllUserResponse setUsers(ArrayList<UserProfile> value) { this.users = value; return this; }
public Integer getCode() { return code; }
public AllUserResponse setCode(Integer value) { this.code = value; return this; }
public String getMessage() { return message; }
public AllUserResponse setMessage(String value) { this.message = value; return this; }
public Integer getTotalCount() { return totalCount; }
public AllUserResponse setTotalCount(Integer value) { this.totalCount = value; return this; }
}
public static class UserProfile extends UserLogin
{
public Integer id = null;
public String fullName = null;
public String email = null;
public Integer departmentId = null;
public Integer partyGroupId = null;
public String avatar = null;
public String telephone = null;
public Date birthday = null;
public Date createdAt = null;
public Date updatedAt = null;
public Integer failedLoginCount = null;
@Ignore()
public ArrayList<Integer> roles = null;
public Date lastLoginDate = null;
public Integer getId() { return id; }
public UserProfile setId(Integer value) { this.id = value; return this; }
public String getFullName() { return fullName; }
public UserProfile setFullName(String value) { this.fullName = value; return this; }
public String getEmail() { return email; }
public UserProfile setEmail(String value) { this.email = value; return this; }
public Integer getDepartmentId() { return departmentId; }
public UserProfile setDepartmentId(Integer value) { this.departmentId = value; return this; }
public Integer getPartyGroupId() { return partyGroupId; }
public UserProfile setPartyGroupId(Integer value) { this.partyGroupId = value; return this; }
public String getAvatar() { return avatar; }
public UserProfile setAvatar(String value) { this.avatar = value; return this; }
public String getTelephone() { return telephone; }
public UserProfile setTelephone(String value) { this.telephone = value; return this; }
public Date getBirthday() { return birthday; }
public UserProfile setBirthday(Date value) { this.birthday = value; return this; }
public Date getCreatedAt() { return createdAt; }
public UserProfile setCreatedAt(Date value) { this.createdAt = value; return this; }
public Date getUpdatedAt() { return updatedAt; }
public UserProfile setUpdatedAt(Date value) { this.updatedAt = value; return this; }
public Integer getFailedLoginCount() { return failedLoginCount; }
public UserProfile setFailedLoginCount(Integer value) { this.failedLoginCount = value; return this; }
public ArrayList<Integer> getRoles() { return roles; }
public UserProfile setRoles(ArrayList<Integer> value) { this.roles = value; return this; }
public Date getLastLoginDate() { return lastLoginDate; }
public UserProfile setLastLoginDate(Date value) { this.lastLoginDate = value; return this; }
}
public static class UserLogin
{
@Required()
public String name = null;
public String getName() { return name; }
public UserLogin setName(String value) { this.name = value; return this; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
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: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<AllUserResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/tvpl.api.ServiceModel">
<Code>0</Code>
<Message>String</Message>
<TotalCount>0</TotalCount>
<Users xmlns:d2p1="http://schemas.datacontract.org/2004/07/tvpl.data.Models">
<d2p1:UserProfile>
<d2p1:Name>String</d2p1:Name>
<d2p1:Password>String</d2p1:Password>
<d2p1:Avatar>String</d2p1:Avatar>
<d2p1:Birthday>0001-01-01T00:00:00</d2p1:Birthday>
<d2p1:CreatedAt>0001-01-01T00:00:00</d2p1:CreatedAt>
<d2p1:CreatedBy>String</d2p1:CreatedBy>
<d2p1:DeletedAt>0001-01-01T00:00:00</d2p1:DeletedAt>
<d2p1:DeletedBy>String</d2p1:DeletedBy>
<d2p1:DepartmentId>0</d2p1:DepartmentId>
<d2p1:Email>String</d2p1:Email>
<d2p1:FailedLoginCount>0</d2p1:FailedLoginCount>
<d2p1:FullName>String</d2p1:FullName>
<d2p1:Id>0</d2p1:Id>
<d2p1:IsDeleted>false</d2p1:IsDeleted>
<d2p1:LastLoginDate>0001-01-01T00:00:00</d2p1:LastLoginDate>
<d2p1:PartyGroupId>0</d2p1:PartyGroupId>
<d2p1:Roles xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:int>0</d4p1:int>
</d2p1:Roles>
<d2p1:Telephone>String</d2p1:Telephone>
<d2p1:UpdatedAt>0001-01-01T00:00:00</d2p1:UpdatedAt>
<d2p1:UpdatedBy>String</d2p1:UpdatedBy>
</d2p1:UserProfile>
</Users>
</AllUserResponse>