Requires any of the roles: | VeoliaAdmin, SupplierAdmin, UserRegistration, User |
GET | /user/{userid} |
---|
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports Portal.ServiceDto
Imports Portal.Common
Namespace Global
Namespace Portal.Common
Public Enum ApplicationUserStatus
Registered = 0
ConfirmedByUser = 1
SupplierUserRegistered = 2
AwaitingSupplierConfirmation = 3
AwaitingVeoliaConfirmation = 4
Active = 5
Rejected = 6
Deleted = 7
End Enum
End Namespace
Namespace Portal.ServiceDto
Public Partial Class BrowseUser
Implements IGet
Public Overridable Property UserId As Integer
End Class
Public Partial Class BrowseUserResponse
Inherits ResponseBase
Public Overridable Property User As UserDetails
End Class
Public Partial Class ModifyRequestBase
Implements IConcurrencyStamp
Public Overridable Property ConcurrencyStamp As String
End Class
Public Partial Class ResponseBase
Public Overridable Property ResponseStatus As ResponseStatus
End Class
Public Partial Class UserDetails
Inherits ModifyRequestBase
Public Sub New()
Meta = New Dictionary(Of String, String)
Roles = New List(Of String)
End Sub
Public Overridable Property Id As Integer
Public Overridable Property Email As String
Public Overridable Property UserName As String
Public Overridable Property PhoneNumber As String
Public Overridable Property DisplayName As String
Public Overridable Property PhoneNumberExtension As String
Public Overridable Property PhoneNumberCountryCodeId As Nullable(Of Integer)
Public Overridable Property PhoneNumberCountryCode As String
Public Overridable Property MobilePhoneNumber As String
Public Overridable Property MobilePhoneNumberCountryCodeId As Nullable(Of Integer)
Public Overridable Property MobilePhoneNumberCountryCode As String
Public Overridable Property OrganizationUnit As String
Public Overridable Property Position As String
Public Overridable Property Status As ApplicationUserStatus
Public Overridable Property SupplierId As Nullable(Of Integer)
Public Overridable Property SupplierOwnerId As Nullable(Of Integer)
Public Overridable Property Meta As Dictionary(Of String, String)
Public Overridable Property Roles As List(Of String)
Public Overridable Property IsSupplierAdmin As Boolean
End Class
End Namespace
End Namespace
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
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: application/json
HTTP/1.1 200 OK Content-Type: application/json 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"}}}