All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
users_current_user_users_me_get | GET /users/me | Users:Current User |
users_current_user_users_me_patch | PATCH /users/me | Users:Current User |
users_user_users_id_delete | DELETE /users/{id} | Users:User |
users_user_users_id_get | GET /users/{id} | Users:User |
users_user_users_id_patch | PATCH /users/{id} | Users:User |
User users_current_user_users_me_get()
Users:Current User
- OAuth Authentication (OAuth2PasswordBearer):
import time
import on_sdk
from on_sdk.api import users_api
from on_sdk.model.user import User
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 = on_sdk.Configuration(
host = "http://localhost"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure OAuth2 access token for authorization: OAuth2PasswordBearer
configuration = on_sdk.Configuration(
host = "http://localhost"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Enter a context with an instance of the API client
with on_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = users_api.UsersApi(api_client)
# example, this endpoint has no required or optional parameters
try:
# Users:Current User
api_response = api_instance.users_current_user_users_me_get()
pprint(api_response)
except on_sdk.ApiException as e:
print("Exception when calling UsersApi->users_current_user_users_me_get: %s\n" % e)
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful Response | - |
401 | Missing token or inactive user. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
User users_current_user_users_me_patch(user_update)
Users:Current User
- OAuth Authentication (OAuth2PasswordBearer):
import time
import on_sdk
from on_sdk.api import users_api
from on_sdk.model.http_validation_error import HTTPValidationError
from on_sdk.model.user_update import UserUpdate
from on_sdk.model.error_model import ErrorModel
from on_sdk.model.user import User
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 = on_sdk.Configuration(
host = "http://localhost"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure OAuth2 access token for authorization: OAuth2PasswordBearer
configuration = on_sdk.Configuration(
host = "http://localhost"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Enter a context with an instance of the API client
with on_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = users_api.UsersApi(api_client)
user_update = UserUpdate(
password="password_example",
email="email_example",
is_active=True,
is_superuser=True,
is_verified=True,
) # UserUpdate |
# example passing only required values which don't have defaults set
try:
# Users:Current User
api_response = api_instance.users_current_user_users_me_patch(user_update)
pprint(api_response)
except on_sdk.ApiException as e:
print("Exception when calling UsersApi->users_current_user_users_me_patch: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
user_update | UserUpdate |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful Response | - |
401 | Missing token or inactive user. | - |
400 | Bad Request | - |
422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
users_user_users_id_delete(id)
Users:User
- OAuth Authentication (OAuth2PasswordBearer):
import time
import on_sdk
from on_sdk.api import users_api
from on_sdk.model.http_validation_error import HTTPValidationError
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 = on_sdk.Configuration(
host = "http://localhost"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure OAuth2 access token for authorization: OAuth2PasswordBearer
configuration = on_sdk.Configuration(
host = "http://localhost"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Enter a context with an instance of the API client
with on_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = users_api.UsersApi(api_client)
id = "id_example" # str |
# example passing only required values which don't have defaults set
try:
# Users:User
api_instance.users_user_users_id_delete(id)
except on_sdk.ApiException as e:
print("Exception when calling UsersApi->users_user_users_id_delete: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
204 | Successful Response | - |
401 | Missing token or inactive user. | - |
403 | Not a superuser. | - |
404 | The user does not exist. | - |
422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
User users_user_users_id_get(id)
Users:User
- OAuth Authentication (OAuth2PasswordBearer):
import time
import on_sdk
from on_sdk.api import users_api
from on_sdk.model.http_validation_error import HTTPValidationError
from on_sdk.model.user import User
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 = on_sdk.Configuration(
host = "http://localhost"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure OAuth2 access token for authorization: OAuth2PasswordBearer
configuration = on_sdk.Configuration(
host = "http://localhost"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Enter a context with an instance of the API client
with on_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = users_api.UsersApi(api_client)
id = "id_example" # str |
# example passing only required values which don't have defaults set
try:
# Users:User
api_response = api_instance.users_user_users_id_get(id)
pprint(api_response)
except on_sdk.ApiException as e:
print("Exception when calling UsersApi->users_user_users_id_get: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful Response | - |
401 | Missing token or inactive user. | - |
403 | Not a superuser. | - |
404 | The user does not exist. | - |
422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
User users_user_users_id_patch(id, user_update)
Users:User
- OAuth Authentication (OAuth2PasswordBearer):
import time
import on_sdk
from on_sdk.api import users_api
from on_sdk.model.http_validation_error import HTTPValidationError
from on_sdk.model.user_update import UserUpdate
from on_sdk.model.error_model import ErrorModel
from on_sdk.model.user import User
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 = on_sdk.Configuration(
host = "http://localhost"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure OAuth2 access token for authorization: OAuth2PasswordBearer
configuration = on_sdk.Configuration(
host = "http://localhost"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Enter a context with an instance of the API client
with on_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = users_api.UsersApi(api_client)
id = "id_example" # str |
user_update = UserUpdate(
password="password_example",
email="email_example",
is_active=True,
is_superuser=True,
is_verified=True,
) # UserUpdate |
# example passing only required values which don't have defaults set
try:
# Users:User
api_response = api_instance.users_user_users_id_patch(id, user_update)
pprint(api_response)
except on_sdk.ApiException as e:
print("Exception when calling UsersApi->users_user_users_id_patch: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | ||
user_update | UserUpdate |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful Response | - |
401 | Missing token or inactive user. | - |
403 | Not a superuser. | - |
404 | The user does not exist. | - |
400 | Bad Request | - |
422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]