All URIs are relative to http://localhost:34913/api/v1
Method | HTTP request | Description |
---|---|---|
get_user_info | GET /users/user | get information of the currently logged-in user |
login | POST /auth/login | perform a login |
logout | POST /auth/logout | perform a logout |
refresh_token | GET /users/refreshtoken | refresh token for more time |
register | POST /users/register | perform user registration |
UserInfo get_user_info()
get information of the currently logged-in user
from __future__ import print_function
import time
import jiaozifs_client
from jiaozifs_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic_auth
configuration = jiaozifs_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# Configure API key authorization: cookie_auth
configuration = jiaozifs_client.Configuration()
configuration.api_key['internal_auth_session'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['internal_auth_session'] = 'Bearer'
# create an instance of the API class
api_instance = jiaozifs_client.AuthApi(jiaozifs_client.ApiClient(configuration))
try:
# get information of the currently logged-in user
api_response = api_instance.get_user_info()
pprint(api_response)
except ApiException as e:
print("Exception when calling AuthApi->get_user_info: %s\n" % e)
This endpoint does not need any parameter.
basic_auth, cookie_auth, jwt_token
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AuthenticationToken login(body=body)
perform a login
from __future__ import print_function
import time
import jiaozifs_client
from jiaozifs_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = jiaozifs_client.AuthApi()
body = jiaozifs_client.AuthLoginBody() # AuthLoginBody | (optional)
try:
# perform a login
api_response = api_instance.login(body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling AuthApi->login: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
body | AuthLoginBody | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
logout()
perform a logout
from __future__ import print_function
import time
import jiaozifs_client
from jiaozifs_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic_auth
configuration = jiaozifs_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# Configure API key authorization: cookie_auth
configuration = jiaozifs_client.Configuration()
configuration.api_key['internal_auth_session'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['internal_auth_session'] = 'Bearer'
# create an instance of the API class
api_instance = jiaozifs_client.AuthApi(jiaozifs_client.ApiClient(configuration))
try:
# perform a logout
api_instance.logout()
except ApiException as e:
print("Exception when calling AuthApi->logout: %s\n" % e)
This endpoint does not need any parameter.
void (empty response body)
basic_auth, cookie_auth, jwt_token
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AuthenticationToken refresh_token()
refresh token for more time
from __future__ import print_function
import time
import jiaozifs_client
from jiaozifs_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: cookie_auth
configuration = jiaozifs_client.Configuration()
configuration.api_key['internal_auth_session'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['internal_auth_session'] = 'Bearer'
# create an instance of the API class
api_instance = jiaozifs_client.AuthApi(jiaozifs_client.ApiClient(configuration))
try:
# refresh token for more time
api_response = api_instance.refresh_token()
pprint(api_response)
except ApiException as e:
print("Exception when calling AuthApi->refresh_token: %s\n" % e)
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UserInfo register(body=body)
perform user registration
from __future__ import print_function
import time
import jiaozifs_client
from jiaozifs_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = jiaozifs_client.AuthApi()
body = jiaozifs_client.UserRegisterInfo() # UserRegisterInfo | (optional)
try:
# perform user registration
api_response = api_instance.register(body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling AuthApi->register: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
body | UserRegisterInfo | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]