POST,GET | /api/Security/GetUserByBranch |
---|
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum
# @Flags()
class TrainingCourse(IntEnum):
ADD_MEMBER = 1
EDIT_MEMBER = 2
ADD_MEMBERSHIP = 4
JOURNAL = 8
HOME = 16
TILL = 32
ACCOUNTING = 64
UNEXPLAINED_PAYMENTS = 128
BOOKINGS = 256
USERS = 512
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class User:
user_id: Optional[int] = None
user_name: Optional[str] = None
name: Optional[str] = None
email: Optional[str] = None
email_confirmed: Optional[bool] = None
mobile_phone: Optional[str] = None
mobile_phone_confirmed: Optional[bool] = None
confirm_password: Optional[str] = None
password: Optional[str] = None
password_salt: Optional[str] = None
enabled: Optional[bool] = None
training: Optional[bool] = None
last_login: Optional[datetime.datetime] = None
created: Optional[datetime.datetime] = None
branch_id: Optional[int] = None
parent_branch_id: Optional[int] = None
member_id: Optional[int] = None
roles: Optional[List[str]] = None
courses_completed: Optional[TrainingCourse] = None
display_home_notification: Optional[bool] = None
two_factor_enabled: Optional[bool] = None
branch_name: Optional[str] = None
branch_key: Optional[str] = None
notifications: Optional[bool] = None
publishable_key: Optional[str] = None
secret_key: Optional[str] = None
app_registration_id: Optional[str] = None
app_registration_link: Optional[str] = None
app_qr_image_link: Optional[str] = None
change_password: Optional[datetime.datetime] = None
activated: Optional[datetime.datetime] = None
Python SecurityService.GetUserByBranchRequest DTOs
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.
POST /api/Security/GetUserByBranch HTTP/1.1
Host: api.clubmanagercentral.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<SecurityService.GetUserByBranchRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ClubManager.Api.Services" />
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <User xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ClubManager.Interfaces.Models.Security"> <_x003C_Activated_x003E_k__BackingField>0001-01-01T00:00:00</_x003C_Activated_x003E_k__BackingField> <_x003C_BranchId_x003E_k__BackingField>0</_x003C_BranchId_x003E_k__BackingField> <_x003C_BranchKey_x003E_k__BackingField>00000000-0000-0000-0000-000000000000</_x003C_BranchKey_x003E_k__BackingField> <_x003C_BranchName_x003E_k__BackingField>String</_x003C_BranchName_x003E_k__BackingField> <_x003C_ChangePassword_x003E_k__BackingField>0001-01-01T00:00:00</_x003C_ChangePassword_x003E_k__BackingField> <_x003C_ConfirmPassword_x003E_k__BackingField>String</_x003C_ConfirmPassword_x003E_k__BackingField> <_x003C_CoursesCompleted_x003E_k__BackingField>AddMember</_x003C_CoursesCompleted_x003E_k__BackingField> <_x003C_Created_x003E_k__BackingField>0001-01-01T00:00:00</_x003C_Created_x003E_k__BackingField> <_x003C_DisplayHomeNotification_x003E_k__BackingField>false</_x003C_DisplayHomeNotification_x003E_k__BackingField> <_x003C_EmailConfirmed_x003E_k__BackingField>false</_x003C_EmailConfirmed_x003E_k__BackingField> <_x003C_Email_x003E_k__BackingField>String</_x003C_Email_x003E_k__BackingField> <_x003C_Enabled_x003E_k__BackingField>false</_x003C_Enabled_x003E_k__BackingField> <_x003C_LastLogin_x003E_k__BackingField>0001-01-01T00:00:00</_x003C_LastLogin_x003E_k__BackingField> <_x003C_MemberId_x003E_k__BackingField>0</_x003C_MemberId_x003E_k__BackingField> <_x003C_MobilePhoneConfirmed_x003E_k__BackingField>false</_x003C_MobilePhoneConfirmed_x003E_k__BackingField> <_x003C_MobilePhone_x003E_k__BackingField>String</_x003C_MobilePhone_x003E_k__BackingField> <_x003C_Name_x003E_k__BackingField>String</_x003C_Name_x003E_k__BackingField> <_x003C_Notifications_x003E_k__BackingField>false</_x003C_Notifications_x003E_k__BackingField> <_x003C_ParentBranchId_x003E_k__BackingField>0</_x003C_ParentBranchId_x003E_k__BackingField> <_x003C_PasswordSalt_x003E_k__BackingField>String</_x003C_PasswordSalt_x003E_k__BackingField> <_x003C_Password_x003E_k__BackingField>String</_x003C_Password_x003E_k__BackingField> <_x003C_PublishableKey_x003E_k__BackingField>String</_x003C_PublishableKey_x003E_k__BackingField> <_x003C_Roles_x003E_k__BackingField xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d2p1:string>String</d2p1:string> </_x003C_Roles_x003E_k__BackingField> <_x003C_SecretKey_x003E_k__BackingField>String</_x003C_SecretKey_x003E_k__BackingField> <_x003C_Training_x003E_k__BackingField>false</_x003C_Training_x003E_k__BackingField> <_x003C_TwoFactorEnabled_x003E_k__BackingField>false</_x003C_TwoFactorEnabled_x003E_k__BackingField> <_x003C_UserId_x003E_k__BackingField>0</_x003C_UserId_x003E_k__BackingField> <_x003C_UserName_x003E_k__BackingField>String</_x003C_UserName_x003E_k__BackingField> </User>