All URIs are relative to http://localhost:8000
| Method | HTTP request | Description |
|---|---|---|
| create_password_user | POST /v1/auth/pw/user | Create Password User Handler |
| fanwei_directory_sync | POST /v1/auth/sso/{tenant_id}/directory_sync | Directory Sync Handler |
| fanwei_directory_sync_0 | POST /v1/auth/sso/{tenant_id}/directory_sync | Directory Sync Handler |
| initiate_sso | POST /v1/auth/sso/initiate | Initiate Sso Handler |
| oauth2_callback | GET /v1/auth/sso/oauth2/callback | Oauth2 Callback Handler |
| pw_email_verification | POST /v1/auth/pw/email_verification | Pw Email Verification Handler |
| pw_signin | POST /v1/auth/pw/signin | Signin Handler |
| refresh_uat | POST /v1/auth/uat | Refresh Uat Handler |
| reset_password | POST /v1/auth/pw/reset | Reset Password Handler |
| reset_password_with_token | POST /v1/auth/pw/reset_with_token | Reset Password With Token Handler |
| send_pw_reset_email | POST /v1/auth/pw/send_reset_email | Send Pw Reset Email Handler |
| signout | POST /v1/auth/signout | Signout Handler |
| sso_signin | GET /v1/auth/sso/{tenant_id}/signin | Sso Login Handler |
UserResponse create_password_user(create_password_user_request)
Create Password User Handler
import ksapi
from ksapi.models.create_password_user_request import CreatePasswordUserRequest
from ksapi.models.user_response import UserResponse
from ksapi.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8000
# See configuration.py for a list of all supported configuration parameters.
configuration = ksapi.Configuration(
host = "http://localhost:8000"
)
# Enter a context with an instance of the API client
with ksapi.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ksapi.AuthApi(api_client)
create_password_user_request = ksapi.CreatePasswordUserRequest() # CreatePasswordUserRequest |
try:
# Create Password User Handler
api_response = api_instance.create_password_user(create_password_user_request)
print("The response of AuthApi->create_password_user:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AuthApi->create_password_user: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| create_password_user_request | CreatePasswordUserRequest |
No authorization required
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 201 | Successful Response | - |
| 422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DirectorySyncResponse fanwei_directory_sync(tenant_id, authorization=authorization, ks_uat=ks_uat)
Directory Sync Handler
Trigger directory synchronization for a FanWei E9 tenant.
Accepts either:
- A logged-in OWNER/ADMIN user (via UAT cookie)
- An admin API key (via Authorization: Bearer header)
import ksapi
from ksapi.models.directory_sync_response import DirectorySyncResponse
from ksapi.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8000
# See configuration.py for a list of all supported configuration parameters.
configuration = ksapi.Configuration(
host = "http://localhost:8000"
)
# Enter a context with an instance of the API client
with ksapi.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ksapi.AuthApi(api_client)
tenant_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID |
authorization = 'authorization_example' # str | (optional)
ks_uat = 'ks_uat_example' # str | (optional)
try:
# Directory Sync Handler
api_response = api_instance.fanwei_directory_sync(tenant_id, authorization=authorization, ks_uat=ks_uat)
print("The response of AuthApi->fanwei_directory_sync:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AuthApi->fanwei_directory_sync: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| tenant_id | UUID | ||
| authorization | str | [optional] | |
| ks_uat | str | [optional] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
| 422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DirectorySyncResponse fanwei_directory_sync_0(tenant_id, authorization=authorization, ks_uat=ks_uat)
Directory Sync Handler
Trigger directory synchronization for a FanWei E9 tenant.
Accepts either:
- A logged-in OWNER/ADMIN user (via UAT cookie)
- An admin API key (via Authorization: Bearer header)
import ksapi
from ksapi.models.directory_sync_response import DirectorySyncResponse
from ksapi.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8000
# See configuration.py for a list of all supported configuration parameters.
configuration = ksapi.Configuration(
host = "http://localhost:8000"
)
# Enter a context with an instance of the API client
with ksapi.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ksapi.AuthApi(api_client)
tenant_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID |
authorization = 'authorization_example' # str | (optional)
ks_uat = 'ks_uat_example' # str | (optional)
try:
# Directory Sync Handler
api_response = api_instance.fanwei_directory_sync_0(tenant_id, authorization=authorization, ks_uat=ks_uat)
print("The response of AuthApi->fanwei_directory_sync_0:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AuthApi->fanwei_directory_sync_0: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| tenant_id | UUID | ||
| authorization | str | [optional] | |
| ks_uat | str | [optional] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
| 422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SSOInitiateResponse initiate_sso(provider, tenant_id=tenant_id)
Initiate Sso Handler
Initiate SSO with the given provider and tenant ID.
import ksapi
from ksapi.models.idp_type import IdpType
from ksapi.models.sso_initiate_response import SSOInitiateResponse
from ksapi.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8000
# See configuration.py for a list of all supported configuration parameters.
configuration = ksapi.Configuration(
host = "http://localhost:8000"
)
# Enter a context with an instance of the API client
with ksapi.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ksapi.AuthApi(api_client)
provider = ksapi.IdpType() # IdpType | Provider to initiate SSO with
tenant_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | Tenant ID to initiate SSO with (optional)
try:
# Initiate Sso Handler
api_response = api_instance.initiate_sso(provider, tenant_id=tenant_id)
print("The response of AuthApi->initiate_sso:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AuthApi->initiate_sso: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| provider | IdpType | Provider to initiate SSO with | |
| tenant_id | UUID | Tenant ID to initiate SSO with | [optional] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
| 422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UserResponse oauth2_callback(provider, code=code, state=state, error=error, error_description=error_description, tenant_id=tenant_id)
Oauth2 Callback Handler
Handle OAuth2 callback from the given OAuth client.
import ksapi
from ksapi.models.idp_type import IdpType
from ksapi.models.user_response import UserResponse
from ksapi.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8000
# See configuration.py for a list of all supported configuration parameters.
configuration = ksapi.Configuration(
host = "http://localhost:8000"
)
# Enter a context with an instance of the API client
with ksapi.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ksapi.AuthApi(api_client)
provider = ksapi.IdpType() # IdpType | Provider to initiate SSO with
code = 'code_example' # str | Authorization code from provider (optional)
state = 'state_example' # str | State parameter for CSRF protection (optional)
error = 'error_example' # str | Error code if authorization failed (optional)
error_description = 'error_description_example' # str | Error description (optional)
tenant_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | Tenant ID to initiate SSO with (optional)
try:
# Oauth2 Callback Handler
api_response = api_instance.oauth2_callback(provider, code=code, state=state, error=error, error_description=error_description, tenant_id=tenant_id)
print("The response of AuthApi->oauth2_callback:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AuthApi->oauth2_callback: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| provider | IdpType | Provider to initiate SSO with | |
| code | str | Authorization code from provider | [optional] |
| state | str | State parameter for CSRF protection | [optional] |
| error | str | Error code if authorization failed | [optional] |
| error_description | str | Error description | [optional] |
| tenant_id | UUID | Tenant ID to initiate SSO with | [optional] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
| 422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
EmailSentResponse pw_email_verification(email_verification_request)
Pw Email Verification Handler
Send password user email verification email.
This endpoint is the first step in the password user creation process. The user receives an email with a link to create their account.
import ksapi
from ksapi.models.email_sent_response import EmailSentResponse
from ksapi.models.email_verification_request import EmailVerificationRequest
from ksapi.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8000
# See configuration.py for a list of all supported configuration parameters.
configuration = ksapi.Configuration(
host = "http://localhost:8000"
)
# Enter a context with an instance of the API client
with ksapi.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ksapi.AuthApi(api_client)
email_verification_request = ksapi.EmailVerificationRequest() # EmailVerificationRequest |
try:
# Pw Email Verification Handler
api_response = api_instance.pw_email_verification(email_verification_request)
print("The response of AuthApi->pw_email_verification:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AuthApi->pw_email_verification: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| email_verification_request | EmailVerificationRequest |
No authorization required
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
| 422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UserResponse pw_signin(sign_in_request)
Signin Handler
Validate password credentials and redirect to callback.
This endpoint validates the user's credentials and stores the user ID in the session, then redirects to /auth/callback?method=pw to maintain consistency with OAuth flows.
import ksapi
from ksapi.models.sign_in_request import SignInRequest
from ksapi.models.user_response import UserResponse
from ksapi.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8000
# See configuration.py for a list of all supported configuration parameters.
configuration = ksapi.Configuration(
host = "http://localhost:8000"
)
# Enter a context with an instance of the API client
with ksapi.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ksapi.AuthApi(api_client)
sign_in_request = ksapi.SignInRequest() # SignInRequest |
try:
# Signin Handler
api_response = api_instance.pw_signin(sign_in_request)
print("The response of AuthApi->pw_signin:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AuthApi->pw_signin: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| sign_in_request | SignInRequest |
No authorization required
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
| 422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UserResponse refresh_uat(tenant_id=tenant_id, authorization=authorization, ks_uat=ks_uat)
Refresh Uat Handler
Refresh or switch the user's active tenant token.
import ksapi
from ksapi.models.user_response import UserResponse
from ksapi.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8000
# See configuration.py for a list of all supported configuration parameters.
configuration = ksapi.Configuration(
host = "http://localhost:8000"
)
# Enter a context with an instance of the API client
with ksapi.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ksapi.AuthApi(api_client)
tenant_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | Target tenant ID to switch to. None=refresh current tenant (optional)
authorization = 'authorization_example' # str | (optional)
ks_uat = 'ks_uat_example' # str | (optional)
try:
# Refresh Uat Handler
api_response = api_instance.refresh_uat(tenant_id=tenant_id, authorization=authorization, ks_uat=ks_uat)
print("The response of AuthApi->refresh_uat:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AuthApi->refresh_uat: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| tenant_id | UUID | Target tenant ID to switch to. None=refresh current tenant | [optional] |
| authorization | str | [optional] | |
| ks_uat | str | [optional] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
| 422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UserResponse reset_password(password_reset_request, authorization=authorization, ks_uat=ks_uat)
Reset Password Handler
Reset password for the authenticated user
import ksapi
from ksapi.models.password_reset_request import PasswordResetRequest
from ksapi.models.user_response import UserResponse
from ksapi.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8000
# See configuration.py for a list of all supported configuration parameters.
configuration = ksapi.Configuration(
host = "http://localhost:8000"
)
# Enter a context with an instance of the API client
with ksapi.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ksapi.AuthApi(api_client)
password_reset_request = ksapi.PasswordResetRequest() # PasswordResetRequest |
authorization = 'authorization_example' # str | (optional)
ks_uat = 'ks_uat_example' # str | (optional)
try:
# Reset Password Handler
api_response = api_instance.reset_password(password_reset_request, authorization=authorization, ks_uat=ks_uat)
print("The response of AuthApi->reset_password:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AuthApi->reset_password: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| password_reset_request | PasswordResetRequest | ||
| authorization | str | [optional] | |
| ks_uat | str | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
| 422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UserResponse reset_password_with_token(password_reset_with_token_request)
Reset Password With Token Handler
Reset password with email verification token
import ksapi
from ksapi.models.password_reset_with_token_request import PasswordResetWithTokenRequest
from ksapi.models.user_response import UserResponse
from ksapi.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8000
# See configuration.py for a list of all supported configuration parameters.
configuration = ksapi.Configuration(
host = "http://localhost:8000"
)
# Enter a context with an instance of the API client
with ksapi.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ksapi.AuthApi(api_client)
password_reset_with_token_request = ksapi.PasswordResetWithTokenRequest() # PasswordResetWithTokenRequest |
try:
# Reset Password With Token Handler
api_response = api_instance.reset_password_with_token(password_reset_with_token_request)
print("The response of AuthApi->reset_password_with_token:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AuthApi->reset_password_with_token: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| password_reset_with_token_request | PasswordResetWithTokenRequest |
No authorization required
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
| 422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
EmailSentResponse send_pw_reset_email(email_verification_request)
Send Pw Reset Email Handler
import ksapi
from ksapi.models.email_sent_response import EmailSentResponse
from ksapi.models.email_verification_request import EmailVerificationRequest
from ksapi.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8000
# See configuration.py for a list of all supported configuration parameters.
configuration = ksapi.Configuration(
host = "http://localhost:8000"
)
# Enter a context with an instance of the API client
with ksapi.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ksapi.AuthApi(api_client)
email_verification_request = ksapi.EmailVerificationRequest() # EmailVerificationRequest |
try:
# Send Pw Reset Email Handler
api_response = api_instance.send_pw_reset_email(email_verification_request)
print("The response of AuthApi->send_pw_reset_email:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AuthApi->send_pw_reset_email: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| email_verification_request | EmailVerificationRequest |
No authorization required
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
| 422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
object signout()
Signout Handler
import ksapi
from ksapi.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8000
# See configuration.py for a list of all supported configuration parameters.
configuration = ksapi.Configuration(
host = "http://localhost:8000"
)
# Enter a context with an instance of the API client
with ksapi.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ksapi.AuthApi(api_client)
try:
# Signout Handler
api_response = api_instance.signout()
print("The response of AuthApi->signout:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AuthApi->signout: %s\n" % e)This endpoint does not need any parameter.
object
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
sso_signin(tenant_id, redirect=redirect)
Sso Login Handler
SSO login endpoint.
Resolves the tenant's IdP configuration and dispatches to the appropriate provider-specific handler. Sets the UAT cookie and redirects to the frontend.
import ksapi
from ksapi.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8000
# See configuration.py for a list of all supported configuration parameters.
configuration = ksapi.Configuration(
host = "http://localhost:8000"
)
# Enter a context with an instance of the API client
with ksapi.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ksapi.AuthApi(api_client)
tenant_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID |
redirect = '' # str | Post-login redirect path (optional) (default to '')
try:
# Sso Login Handler
api_instance.sso_signin(tenant_id, redirect=redirect)
except Exception as e:
print("Exception when calling AuthApi->sso_signin: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| tenant_id | UUID | ||
| redirect | str | Post-login redirect path | [optional] [default to ''] |
void (empty response body)
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 307 | Successful Response | - |
| 422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]