Skip to content

Latest commit

 

History

History
284 lines (188 loc) · 8 KB

UsersApi.md

File metadata and controls

284 lines (188 loc) · 8 KB

UsersApi

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

create_user

ResponseCreateUserResponse create_user(create_user_request)

Create User

Example

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)

Parameters

Name Type Description Notes
create_user_request CreateUserRequest

Return type

ResponseCreateUserResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

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]

get_user_by_id

object get_user_by_id(user_id)

Get User By Id

Example

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)

Parameters

Name Type Description Notes
user_id str

Return type

object

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

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]

get_users

GetAllUsersResponse get_users(get_all_users_request)

Get Users

Example

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)

Parameters

Name Type Description Notes
get_all_users_request GetAllUsersRequest

Return type

GetAllUsersResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

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]

update_user

UpdateUserResponse update_user(id, update_user_api_request)

Update User

Example

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)

Parameters

Name Type Description Notes
id str
update_user_api_request UpdateUserAPIRequest

Return type

UpdateUserResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

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]