All URIs are relative to http://localhost
Method | Description |
---|---|
create_user | Create User |
get_user_by_id | Get User By Id |
get_users | Get Users |
update_user | Update User |
ResponseCreateUserResponse create_user(create_user_request)
Create User
import onelens_backend_client
from onelens_backend_client.models.create_user_request import CreateUserRequest
from onelens_backend_client.models.response_create_user_response import ResponseCreateUserResponse
from onelens_backend_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = onelens_backend_client.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
with onelens_backend_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = onelens_backend_client.UsersApi(api_client)
create_user_request = onelens_backend_client.CreateUserRequest() # CreateUserRequest |
try:
# Create User
api_response = api_instance.create_user(create_user_request)
print("The response of UsersApi->create_user:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling UsersApi->create_user: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
create_user_request | CreateUserRequest |
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 get_user_by_id(user_id)
Get User By Id
import onelens_backend_client
from onelens_backend_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = onelens_backend_client.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
with onelens_backend_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = onelens_backend_client.UsersApi(api_client)
user_id = 'user_id_example' # str |
try:
# Get User By Id
api_response = api_instance.get_user_by_id(user_id)
print("The response of UsersApi->get_user_by_id:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling UsersApi->get_user_by_id: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
user_id | str |
object
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]
GetAllUsersResponse get_users(get_all_users_request)
Get Users
import onelens_backend_client
from onelens_backend_client.models.get_all_users_request import GetAllUsersRequest
from onelens_backend_client.models.get_all_users_response import GetAllUsersResponse
from onelens_backend_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = onelens_backend_client.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
with onelens_backend_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = onelens_backend_client.UsersApi(api_client)
get_all_users_request = onelens_backend_client.GetAllUsersRequest() # GetAllUsersRequest |
try:
# Get Users
api_response = api_instance.get_users(get_all_users_request)
print("The response of UsersApi->get_users:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling UsersApi->get_users: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
get_all_users_request | GetAllUsersRequest |
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]
UpdateUserResponse update_user(id, update_user_api_request)
Update User
import onelens_backend_client
from onelens_backend_client.models.update_user_api_request import UpdateUserAPIRequest
from onelens_backend_client.models.update_user_response import UpdateUserResponse
from onelens_backend_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = onelens_backend_client.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
with onelens_backend_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = onelens_backend_client.UsersApi(api_client)
id = 'id_example' # str |
update_user_api_request = onelens_backend_client.UpdateUserAPIRequest() # UpdateUserAPIRequest |
try:
# Update User
api_response = api_instance.update_user(id, update_user_api_request)
print("The response of UsersApi->update_user:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling UsersApi->update_user: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | ||
update_user_api_request | UpdateUserAPIRequest |
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]