Skip to content

Latest commit

 

History

History
926 lines (644 loc) · 31.4 KB

UserApi.md

File metadata and controls

926 lines (644 loc) · 31.4 KB

kowabunga.UserApi

All URIs are relative to https://raw.githubusercontent.com/api/v1

Method HTTP request Description
create_user POST /user
delete_user DELETE /user/{userId}
list_users GET /user
login POST /login
logout POST /logout
read_user GET /user/{userId}
reset_password POST /resetPassword
reset_user_password PATCH /user/{userId}/resetPassword
set_user_api_token PATCH /user/{userId}/token
set_user_password PUT /user/{userId}/password
update_user PUT /user/{userId}

create_user

User create_user(user)

Creates a new Kowabunga user.

Example

  • Api Key Authentication (ApiKeyAuth):
  • Bearer (JWT) Authentication (BearerAuth):
import kowabunga
from kowabunga.models.user import User
from kowabunga.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://raw.githubusercontent.com/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = kowabunga.Configuration(
    host = "https://raw.githubusercontent.com/api/v1"
)

# 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 API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Configure Bearer authorization (JWT): BearerAuth
configuration = kowabunga.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with kowabunga.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = kowabunga.UserApi(api_client)
    user = kowabunga.User() # User | User payload.

    try:
        api_response = api_instance.create_user(user)
        print("The response of UserApi->create_user:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling UserApi->create_user: %s\n" % e)

Parameters

Name Type Description Notes
user User User payload.

Return type

User

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
201 Returns the newly created Kowabunga user object. -
400 BadRequest error: Bad request (wrong input parameters). -
401 Unauthorized error: Unauthorized resource access (wrong auth/credentials). -
403 Forbidden error: Forbidden resource access (restricted access control). -
500 InternalServerError error: Server-side failure while processing the request. -
404 NotFound error: Specified resource does not exist. -
409 Conflict error: A similar resource already exists or resource is still being referenced somewhere. -
422 UnprocessableEntity error: Server can't process request. -
507 InsufficientResource error: Server can't allocate resources (logical quotas or physical limits hit). -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_user

delete_user(user_id)

Deletes an existing Kowabunga user.

Example

  • Api Key Authentication (ApiKeyAuth):
  • Bearer (JWT) Authentication (BearerAuth):
import kowabunga
from kowabunga.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://raw.githubusercontent.com/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = kowabunga.Configuration(
    host = "https://raw.githubusercontent.com/api/v1"
)

# 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 API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Configure Bearer authorization (JWT): BearerAuth
configuration = kowabunga.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with kowabunga.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = kowabunga.UserApi(api_client)
    user_id = 'user_id_example' # str | The ID of the Kowabunga user.

    try:
        api_instance.delete_user(user_id)
    except Exception as e:
        print("Exception when calling UserApi->delete_user: %s\n" % e)

Parameters

Name Type Description Notes
user_id str The ID of the Kowabunga user.

Return type

void (empty response body)

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 The Kowabunga user has been successfully removed. -
401 Unauthorized error: Unauthorized resource access (wrong auth/credentials). -
403 Forbidden error: Forbidden resource access (restricted access control). -
500 InternalServerError error: Server-side failure while processing the request. -
404 NotFound error: Specified resource does not exist. -
409 Conflict error: A similar resource already exists or resource is still being referenced somewhere. -
422 UnprocessableEntity error: Server can't process request. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

list_users

List[str] list_users()

Returns the IDs of Kowabunga user objects.

Example

  • Api Key Authentication (ApiKeyAuth):
  • Bearer (JWT) Authentication (BearerAuth):
import kowabunga
from kowabunga.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://raw.githubusercontent.com/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = kowabunga.Configuration(
    host = "https://raw.githubusercontent.com/api/v1"
)

# 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 API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Configure Bearer authorization (JWT): BearerAuth
configuration = kowabunga.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

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

    try:
        api_response = api_instance.list_users()
        print("The response of UserApi->list_users:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling UserApi->list_users: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

List[str]

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Returns an array of Kowabunga user IDs. -
401 Unauthorized error: Unauthorized resource access (wrong auth/credentials). -
403 Forbidden error: Forbidden resource access (restricted access control). -
500 InternalServerError error: Server-side failure while processing the request. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

login

UserCredentials login(user_credentials)

Authenticates a Kowabunga user and returns a JWT token for Bearer Authentication.

Example

import kowabunga
from kowabunga.models.user_credentials import UserCredentials
from kowabunga.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://raw.githubusercontent.com/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = kowabunga.Configuration(
    host = "https://raw.githubusercontent.com/api/v1"
)


# Enter a context with an instance of the API client
with kowabunga.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = kowabunga.UserApi(api_client)
    user_credentials = kowabunga.UserCredentials() # UserCredentials | UserCredentials payload.

    try:
        api_response = api_instance.login(user_credentials)
        print("The response of UserApi->login:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling UserApi->login: %s\n" % e)

Parameters

Name Type Description Notes
user_credentials UserCredentials UserCredentials payload.

Return type

UserCredentials

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Returns the Kowabunga user login credentials, along with the JWT token. -
400 BadRequest error: Bad request (wrong input parameters). -
401 Unauthorized error: Unauthorized resource access (wrong auth/credentials). -
500 InternalServerError error: Server-side failure while processing the request. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

logout

logout()

Terminates the Kowabunga user logout session, revoking the JWT token in use.

Example

  • Api Key Authentication (ApiKeyAuth):
  • Bearer (JWT) Authentication (BearerAuth):
import kowabunga
from kowabunga.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://raw.githubusercontent.com/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = kowabunga.Configuration(
    host = "https://raw.githubusercontent.com/api/v1"
)

# 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 API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Configure Bearer authorization (JWT): BearerAuth
configuration = kowabunga.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

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

    try:
        api_instance.logout()
    except Exception as e:
        print("Exception when calling UserApi->logout: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

void (empty response body)

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
204 The Kowabunga user logout session has been terminated. -
401 Unauthorized error: Unauthorized resource access (wrong auth/credentials). -
500 InternalServerError error: Server-side failure while processing the request. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

read_user

User read_user(user_id)

Returns a Kowabunga user.

Example

  • Api Key Authentication (ApiKeyAuth):
  • Bearer (JWT) Authentication (BearerAuth):
import kowabunga
from kowabunga.models.user import User
from kowabunga.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://raw.githubusercontent.com/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = kowabunga.Configuration(
    host = "https://raw.githubusercontent.com/api/v1"
)

# 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 API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Configure Bearer authorization (JWT): BearerAuth
configuration = kowabunga.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with kowabunga.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = kowabunga.UserApi(api_client)
    user_id = 'user_id_example' # str | The ID of the Kowabunga user.

    try:
        api_response = api_instance.read_user(user_id)
        print("The response of UserApi->read_user:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling UserApi->read_user: %s\n" % e)

Parameters

Name Type Description Notes
user_id str The ID of the Kowabunga user.

Return type

User

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Returns the Kowabunga user object. -
401 Unauthorized error: Unauthorized resource access (wrong auth/credentials). -
403 Forbidden error: Forbidden resource access (restricted access control). -
500 InternalServerError error: Server-side failure while processing the request. -
404 NotFound error: Specified resource does not exist. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

reset_password

reset_password(user_email)

Resets the password of the Kowabunga user with the provided email address. A new password is server-side generated, replacing any existing one, and sent by email. For privacy reasons, the response is the same whether the email address is registered or not.

Example

import kowabunga
from kowabunga.models.user_email import UserEmail
from kowabunga.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://raw.githubusercontent.com/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = kowabunga.Configuration(
    host = "https://raw.githubusercontent.com/api/v1"
)


# Enter a context with an instance of the API client
with kowabunga.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = kowabunga.UserApi(api_client)
    user_email = kowabunga.UserEmail() # UserEmail | UserEmail payload.

    try:
        api_instance.reset_password(user_email)
    except Exception as e:
        print("Exception when calling UserApi->reset_password: %s\n" % e)

Parameters

Name Type Description Notes
user_email UserEmail UserEmail payload.

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 The password reset request has been processed. -
400 BadRequest error: Bad request (wrong input parameters). -
500 InternalServerError error: Server-side failure while processing the request. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

reset_user_password

reset_user_password(user_id)

Performs a Kowabunga user reset of password (server-side generated, will replace any existing one).

Example

  • Api Key Authentication (ApiKeyAuth):
  • Bearer (JWT) Authentication (BearerAuth):
import kowabunga
from kowabunga.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://raw.githubusercontent.com/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = kowabunga.Configuration(
    host = "https://raw.githubusercontent.com/api/v1"
)

# 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 API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Configure Bearer authorization (JWT): BearerAuth
configuration = kowabunga.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with kowabunga.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = kowabunga.UserApi(api_client)
    user_id = 'user_id_example' # str | The ID of the Kowabunga user.

    try:
        api_instance.reset_user_password(user_id)
    except Exception as e:
        print("Exception when calling UserApi->reset_user_password: %s\n" % e)

Parameters

Name Type Description Notes
user_id str The ID of the Kowabunga user.

Return type

void (empty response body)

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 The Kowabunga user reset of password (server-side generated, will replace any existing one) is successful. -
401 Unauthorized error: Unauthorized resource access (wrong auth/credentials). -
403 Forbidden error: Forbidden resource access (restricted access control). -
500 InternalServerError error: Server-side failure while processing the request. -
404 NotFound error: Specified resource does not exist. -
422 UnprocessableEntity error: Server can't process request. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

set_user_api_token

ApiToken set_user_api_token(user_id, expire=expire, expiration_date=expiration_date)

Performs a Kowabunga user setting of API token (will replace any existing one; the generated API key is only sent once, by email, to the user).

Example

  • Api Key Authentication (ApiKeyAuth):
  • Bearer (JWT) Authentication (BearerAuth):
import kowabunga
from kowabunga.models.api_token import ApiToken
from kowabunga.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://raw.githubusercontent.com/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = kowabunga.Configuration(
    host = "https://raw.githubusercontent.com/api/v1"
)

# 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 API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Configure Bearer authorization (JWT): BearerAuth
configuration = kowabunga.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with kowabunga.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = kowabunga.UserApi(api_client)
    user_id = 'user_id_example' # str | The ID of the Kowabunga user.
    expire = False # bool | Whether or not the token should expire. (optional) (default to False)
    expiration_date = '2013-10-20' # date | Token's expiration date (YYYY-MM-DD format). (optional)

    try:
        api_response = api_instance.set_user_api_token(user_id, expire=expire, expiration_date=expiration_date)
        print("The response of UserApi->set_user_api_token:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling UserApi->set_user_api_token: %s\n" % e)

Parameters

Name Type Description Notes
user_id str The ID of the Kowabunga user.
expire bool Whether or not the token should expire. [optional] [default to False]
expiration_date date Token's expiration date (YYYY-MM-DD format). [optional]

Return type

ApiToken

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Returns the server-to-server authentication security token object. -
401 Unauthorized error: Unauthorized resource access (wrong auth/credentials). -
403 Forbidden error: Forbidden resource access (restricted access control). -
500 InternalServerError error: Server-side failure while processing the request. -
404 NotFound error: Specified resource does not exist. -
422 UnprocessableEntity error: Server can't process request. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

set_user_password

set_user_password(user_id, password)

Updates a Kowabunga user password (will replace any existing one) configuration.

Example

  • Api Key Authentication (ApiKeyAuth):
  • Bearer (JWT) Authentication (BearerAuth):
import kowabunga
from kowabunga.models.password import Password
from kowabunga.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://raw.githubusercontent.com/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = kowabunga.Configuration(
    host = "https://raw.githubusercontent.com/api/v1"
)

# 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 API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Configure Bearer authorization (JWT): BearerAuth
configuration = kowabunga.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with kowabunga.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = kowabunga.UserApi(api_client)
    user_id = 'user_id_example' # str | The ID of the Kowabunga user.
    password = kowabunga.Password() # Password | Password payload.

    try:
        api_instance.set_user_password(user_id, password)
    except Exception as e:
        print("Exception when calling UserApi->set_user_password: %s\n" % e)

Parameters

Name Type Description Notes
user_id str The ID of the Kowabunga user.
password Password Password payload.

Return type

void (empty response body)

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 The Kowabunga user password (will replace any existing one) has been updated. -
400 BadRequest error: Bad request (wrong input parameters). -
401 Unauthorized error: Unauthorized resource access (wrong auth/credentials). -
403 Forbidden error: Forbidden resource access (restricted access control). -
500 InternalServerError error: Server-side failure while processing the request. -
404 NotFound error: Specified resource does not exist. -
422 UnprocessableEntity error: Server can't process request. -
507 InsufficientResource error: Server can't allocate resources (logical quotas or physical limits hit). -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

update_user

User update_user(user_id, user_update)

Updates a Kowabunga user configuration.

Example

  • Api Key Authentication (ApiKeyAuth):
  • Bearer (JWT) Authentication (BearerAuth):
import kowabunga
from kowabunga.models.user import User
from kowabunga.models.user_update import UserUpdate
from kowabunga.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://raw.githubusercontent.com/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = kowabunga.Configuration(
    host = "https://raw.githubusercontent.com/api/v1"
)

# 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 API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Configure Bearer authorization (JWT): BearerAuth
configuration = kowabunga.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with kowabunga.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = kowabunga.UserApi(api_client)
    user_id = 'user_id_example' # str | The ID of the Kowabunga user.
    user_update = kowabunga.UserUpdate() # UserUpdate | UserUpdate payload.

    try:
        api_response = api_instance.update_user(user_id, user_update)
        print("The response of UserApi->update_user:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling UserApi->update_user: %s\n" % e)

Parameters

Name Type Description Notes
user_id str The ID of the Kowabunga user.
user_update UserUpdate UserUpdate payload.

Return type

User

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Returns the Kowabunga user object. -
400 BadRequest error: Bad request (wrong input parameters). -
401 Unauthorized error: Unauthorized resource access (wrong auth/credentials). -
403 Forbidden error: Forbidden resource access (restricted access control). -
500 InternalServerError error: Server-side failure while processing the request. -
404 NotFound error: Specified resource does not exist. -
422 UnprocessableEntity error: Server can't process request. -
507 InsufficientResource error: Server can't allocate resources (logical quotas or physical limits hit). -

[Back to top] [Back to API list] [Back to Model list] [Back to README]