Requires any of the roles: | VeoliaAdmin, SupplierAdmin, UserRegistration, User |
GET | /user/{userid} |
---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class BrowseUser implements IGet
{
public Integer UserId = null;
public Integer getUserId() { return UserId; }
public BrowseUser setUserId(Integer value) { this.UserId = value; return this; }
}
public static class BrowseUserResponse extends ResponseBase
{
public UserDetails User = null;
public UserDetails getUser() { return User; }
public BrowseUserResponse setUser(UserDetails value) { this.User = value; return this; }
}
public static class ResponseBase
{
public ResponseStatus ResponseStatus = null;
public ResponseStatus getResponseStatus() { return ResponseStatus; }
public ResponseBase setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
}
public static class UserDetails extends ModifyRequestBase
{
public Integer Id = null;
public String Email = null;
public String UserName = null;
public String PhoneNumber = null;
public String DisplayName = null;
public String PhoneNumberExtension = null;
public Integer PhoneNumberCountryCodeId = null;
public String PhoneNumberCountryCode = null;
public String MobilePhoneNumber = null;
public Integer MobilePhoneNumberCountryCodeId = null;
public String MobilePhoneNumberCountryCode = null;
public String OrganizationUnit = null;
public String Position = null;
public ApplicationUserStatus Status = null;
public Integer SupplierId = null;
public Integer SupplierOwnerId = null;
public HashMap<String,String> Meta = null;
public ArrayList<String> Roles = null;
public Boolean IsSupplierAdmin = null;
public Integer getId() { return Id; }
public UserDetails setId(Integer value) { this.Id = value; return this; }
public String getEmail() { return Email; }
public UserDetails setEmail(String value) { this.Email = value; return this; }
public String getUserName() { return UserName; }
public UserDetails setUserName(String value) { this.UserName = value; return this; }
public String getPhoneNumber() { return PhoneNumber; }
public UserDetails setPhoneNumber(String value) { this.PhoneNumber = value; return this; }
public String getDisplayName() { return DisplayName; }
public UserDetails setDisplayName(String value) { this.DisplayName = value; return this; }
public String getPhoneNumberExtension() { return PhoneNumberExtension; }
public UserDetails setPhoneNumberExtension(String value) { this.PhoneNumberExtension = value; return this; }
public Integer getPhoneNumberCountryCodeId() { return PhoneNumberCountryCodeId; }
public UserDetails setPhoneNumberCountryCodeId(Integer value) { this.PhoneNumberCountryCodeId = value; return this; }
public String getPhoneNumberCountryCode() { return PhoneNumberCountryCode; }
public UserDetails setPhoneNumberCountryCode(String value) { this.PhoneNumberCountryCode = value; return this; }
public String getMobilePhoneNumber() { return MobilePhoneNumber; }
public UserDetails setMobilePhoneNumber(String value) { this.MobilePhoneNumber = value; return this; }
public Integer getMobilePhoneNumberCountryCodeId() { return MobilePhoneNumberCountryCodeId; }
public UserDetails setMobilePhoneNumberCountryCodeId(Integer value) { this.MobilePhoneNumberCountryCodeId = value; return this; }
public String getMobilePhoneNumberCountryCode() { return MobilePhoneNumberCountryCode; }
public UserDetails setMobilePhoneNumberCountryCode(String value) { this.MobilePhoneNumberCountryCode = value; return this; }
public String getOrganizationUnit() { return OrganizationUnit; }
public UserDetails setOrganizationUnit(String value) { this.OrganizationUnit = value; return this; }
public String getPosition() { return Position; }
public UserDetails setPosition(String value) { this.Position = value; return this; }
public ApplicationUserStatus getStatus() { return Status; }
public UserDetails setStatus(ApplicationUserStatus value) { this.Status = value; return this; }
public Integer getSupplierId() { return SupplierId; }
public UserDetails setSupplierId(Integer value) { this.SupplierId = value; return this; }
public Integer getSupplierOwnerId() { return SupplierOwnerId; }
public UserDetails setSupplierOwnerId(Integer value) { this.SupplierOwnerId = value; return this; }
public HashMap<String,String> getMeta() { return Meta; }
public UserDetails setMeta(HashMap<String,String> value) { this.Meta = value; return this; }
public ArrayList<String> getRoles() { return Roles; }
public UserDetails setRoles(ArrayList<String> value) { this.Roles = value; return this; }
public Boolean getIsSupplierAdmin() { return IsSupplierAdmin; }
public UserDetails setIsSupplierAdmin(Boolean value) { this.IsSupplierAdmin = value; return this; }
}
public static class ModifyRequestBase implements IConcurrencyStamp
{
public String ConcurrencyStamp = null;
public String getConcurrencyStamp() { return ConcurrencyStamp; }
public ModifyRequestBase setConcurrencyStamp(String value) { this.ConcurrencyStamp = value; return this; }
}
public static enum ApplicationUserStatus
{
@SerializedName("0") Registered(0),
@SerializedName("1") ConfirmedByUser(1),
@SerializedName("2") SupplierUserRegistered(2),
@SerializedName("3") AwaitingSupplierConfirmation(3),
@SerializedName("4") AwaitingVeoliaConfirmation(4),
@SerializedName("5") Active(5),
@SerializedName("6") Rejected(6),
@SerializedName("7") Deleted(7);
private final int value;
ApplicationUserStatus(final int intValue) { value = intValue; }
public int getValue() { return value; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /user/{userid} HTTP/1.1 Host: szallitoiportal-be.veolia.hu Accept: text/jsonl
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length {"User":{"Id":0,"Email":"String","UserName":"String","PhoneNumber":"String","DisplayName":"String","PhoneNumberExtension":"String","PhoneNumberCountryCodeId":0,"PhoneNumberCountryCode":"String","MobilePhoneNumber":"String","MobilePhoneNumberCountryCodeId":0,"MobilePhoneNumberCountryCode":"String","OrganizationUnit":"String","Position":"String","Status":0,"SupplierId":0,"SupplierOwnerId":0,"Meta":{"String":"String"},"Roles":["String"],"IsSupplierAdmin":true,"ConcurrencyStamp":"String"},"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}