Skip to content

Latest commit

 

History

History
392 lines (269 loc) · 12.2 KB

UsersApi.md

File metadata and controls

392 lines (269 loc) · 12.2 KB

openapi_client.UsersApi

All URIs are relative to https://subsetter-api-jbzfw6l52q-uc.a.run.app

Method HTTP request Description
users_current_user_users_me_get GET /users/me Users:Current User
users_delete_user_users_id_delete DELETE /users/{id} Users:Delete User
users_patch_current_user_users_me_patch PATCH /users/me Users:Patch Current User
users_patch_user_users_id_patch PATCH /users/{id} Users:Patch User
users_user_users_id_get GET /users/{id} Users:User

users_current_user_users_me_get

UserRead users_current_user_users_me_get()

Users:Current User

Example

  • OAuth Authentication (OAuth2PasswordBearer):
import openapi_client
from openapi_client.models.user_read import UserRead
from openapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://subsetter-api-jbzfw6l52q-uc.a.run.app
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
    host = "https://subsetter-api-jbzfw6l52q-uc.a.run.app"
)

# 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.

configuration.access_token = os.environ["ACCESS_TOKEN"]

# Enter a context with an instance of the API client
with openapi_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = openapi_client.UsersApi(api_client)

    try:
        # Users:Current User
        api_response = api_instance.users_current_user_users_me_get()
        print("The response of UsersApi->users_current_user_users_me_get:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling UsersApi->users_current_user_users_me_get: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

UserRead

Authorization

OAuth2PasswordBearer

HTTP request headers

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

HTTP response details

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]

users_delete_user_users_id_delete

users_delete_user_users_id_delete(id)

Users:Delete User

Example

  • OAuth Authentication (OAuth2PasswordBearer):
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://subsetter-api-jbzfw6l52q-uc.a.run.app
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
    host = "https://subsetter-api-jbzfw6l52q-uc.a.run.app"
)

# 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.

configuration.access_token = os.environ["ACCESS_TOKEN"]

# Enter a context with an instance of the API client
with openapi_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = openapi_client.UsersApi(api_client)
    id = 'id_example' # str | 

    try:
        # Users:Delete User
        api_instance.users_delete_user_users_id_delete(id)
    except Exception as e:
        print("Exception when calling UsersApi->users_delete_user_users_id_delete: %s\n" % e)

Parameters

Name Type Description Notes
id str

Return type

void (empty response body)

Authorization

OAuth2PasswordBearer

HTTP request headers

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

HTTP response details

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]

users_patch_current_user_users_me_patch

UserRead users_patch_current_user_users_me_patch(user_update)

Users:Patch Current User

Example

  • OAuth Authentication (OAuth2PasswordBearer):
import openapi_client
from openapi_client.models.user_read import UserRead
from openapi_client.models.user_update import UserUpdate
from openapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://subsetter-api-jbzfw6l52q-uc.a.run.app
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
    host = "https://subsetter-api-jbzfw6l52q-uc.a.run.app"
)

# 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.

configuration.access_token = os.environ["ACCESS_TOKEN"]

# Enter a context with an instance of the API client
with openapi_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = openapi_client.UsersApi(api_client)
    user_update = openapi_client.UserUpdate() # UserUpdate | 

    try:
        # Users:Patch Current User
        api_response = api_instance.users_patch_current_user_users_me_patch(user_update)
        print("The response of UsersApi->users_patch_current_user_users_me_patch:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling UsersApi->users_patch_current_user_users_me_patch: %s\n" % e)

Parameters

Name Type Description Notes
user_update UserUpdate

Return type

UserRead

Authorization

OAuth2PasswordBearer

HTTP request headers

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

HTTP response details

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_patch_user_users_id_patch

UserRead users_patch_user_users_id_patch(id, user_update)

Users:Patch User

Example

  • OAuth Authentication (OAuth2PasswordBearer):
import openapi_client
from openapi_client.models.user_read import UserRead
from openapi_client.models.user_update import UserUpdate
from openapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://subsetter-api-jbzfw6l52q-uc.a.run.app
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
    host = "https://subsetter-api-jbzfw6l52q-uc.a.run.app"
)

# 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.

configuration.access_token = os.environ["ACCESS_TOKEN"]

# Enter a context with an instance of the API client
with openapi_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = openapi_client.UsersApi(api_client)
    id = 'id_example' # str | 
    user_update = openapi_client.UserUpdate() # UserUpdate | 

    try:
        # Users:Patch User
        api_response = api_instance.users_patch_user_users_id_patch(id, user_update)
        print("The response of UsersApi->users_patch_user_users_id_patch:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling UsersApi->users_patch_user_users_id_patch: %s\n" % e)

Parameters

Name Type Description Notes
id str
user_update UserUpdate

Return type

UserRead

Authorization

OAuth2PasswordBearer

HTTP request headers

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

HTTP response details

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]

users_user_users_id_get

UserRead users_user_users_id_get(id)

Users:User

Example

  • OAuth Authentication (OAuth2PasswordBearer):
import openapi_client
from openapi_client.models.user_read import UserRead
from openapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://subsetter-api-jbzfw6l52q-uc.a.run.app
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
    host = "https://subsetter-api-jbzfw6l52q-uc.a.run.app"
)

# 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.

configuration.access_token = os.environ["ACCESS_TOKEN"]

# Enter a context with an instance of the API client
with openapi_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = openapi_client.UsersApi(api_client)
    id = 'id_example' # str | 

    try:
        # Users:User
        api_response = api_instance.users_user_users_id_get(id)
        print("The response of UsersApi->users_user_users_id_get:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling UsersApi->users_user_users_id_get: %s\n" % e)

Parameters

Name Type Description Notes
id str

Return type

UserRead

Authorization

OAuth2PasswordBearer

HTTP request headers

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

HTTP response details

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]