All URIs are relative to /api
| Method | HTTP request | Description |
|---|---|---|
| add_token | POST /user/token | Create a token for the current user |
| delete_token | DELETE /user/token/{id} | Delete the token |
| get_current_user | GET /user | Return the user details for the current user |
| get_token | GET /user/token/{id} | Retrieve a single token for the current user |
| get_token_list | GET /user/token | Return the tokens for the user |
| update_current_user | PUT /user | Return the user details for the current user |
Token add_token(create_token=create_token)
Create a token for the current user
- Bearer (JWT) Authentication (jwt):
import ibutsu_client
from ibutsu_client.models.create_token import CreateToken
from ibutsu_client.models.token import Token
from ibutsu_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api
# See configuration.py for a list of all supported configuration parameters.
configuration = ibutsu_client.Configuration(
host = "/api"
)
# 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 Bearer authorization (JWT): jwt
configuration = ibutsu_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with ibutsu_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ibutsu_client.UserApi(api_client)
create_token = ibutsu_client.CreateToken() # CreateToken | Create a token for a user (optional)
try:
# Create a token for the current user
api_response = api_instance.add_token(create_token=create_token)
print("The response of UserApi->add_token:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling UserApi->add_token: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| create_token | CreateToken | Create a token for a user | [optional] |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 201 | The newly created token | - |
| 401 | The user needs to be logged in | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete_token(id)
Delete the token
- Bearer (JWT) Authentication (jwt):
import ibutsu_client
from ibutsu_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api
# See configuration.py for a list of all supported configuration parameters.
configuration = ibutsu_client.Configuration(
host = "/api"
)
# 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 Bearer authorization (JWT): jwt
configuration = ibutsu_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with ibutsu_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ibutsu_client.UserApi(api_client)
id = 'id_example' # str | The id of a token
try:
# Delete the token
api_instance.delete_token(id)
except Exception as e:
print("Exception when calling UserApi->delete_token: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | str | The id of a token |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
| Status code | Description | Response headers |
|---|---|---|
| 200 | The token was deleted | - |
| 401 | The user needs to be logged in | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
User get_current_user()
Return the user details for the current user
- Bearer (JWT) Authentication (jwt):
import ibutsu_client
from ibutsu_client.models.user import User
from ibutsu_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api
# See configuration.py for a list of all supported configuration parameters.
configuration = ibutsu_client.Configuration(
host = "/api"
)
# 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 Bearer authorization (JWT): jwt
configuration = ibutsu_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with ibutsu_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ibutsu_client.UserApi(api_client)
try:
# Return the user details for the current user
api_response = api_instance.get_current_user()
print("The response of UserApi->get_current_user:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling UserApi->get_current_user: %s\n" % e)This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | The details of the logged in user | - |
| 401 | The user needs to be logged in | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Token get_token(id)
Retrieve a single token for the current user
- Bearer (JWT) Authentication (jwt):
import ibutsu_client
from ibutsu_client.models.token import Token
from ibutsu_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api
# See configuration.py for a list of all supported configuration parameters.
configuration = ibutsu_client.Configuration(
host = "/api"
)
# 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 Bearer authorization (JWT): jwt
configuration = ibutsu_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with ibutsu_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ibutsu_client.UserApi(api_client)
id = 'id_example' # str | The id of a token
try:
# Retrieve a single token for the current user
api_response = api_instance.get_token(id)
print("The response of UserApi->get_token:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling UserApi->get_token: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | str | The id of a token |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | A single token for the logged in user | - |
| 401 | The user needs to be logged in | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TokenList get_token_list(page=page, page_size=page_size)
Return the tokens for the user
- Bearer (JWT) Authentication (jwt):
import ibutsu_client
from ibutsu_client.models.token_list import TokenList
from ibutsu_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api
# See configuration.py for a list of all supported configuration parameters.
configuration = ibutsu_client.Configuration(
host = "/api"
)
# 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 Bearer authorization (JWT): jwt
configuration = ibutsu_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with ibutsu_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ibutsu_client.UserApi(api_client)
page = 56 # int | Set the page of items to return, defaults to 1 (optional)
page_size = 56 # int | Set the number of items per page, defaults to 25 (optional)
try:
# Return the tokens for the user
api_response = api_instance.get_token_list(page=page, page_size=page_size)
print("The response of UserApi->get_token_list:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling UserApi->get_token_list: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| page | int | Set the page of items to return, defaults to 1 | [optional] |
| page_size | int | Set the number of items per page, defaults to 25 | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | The list of tokens for the logged in user | - |
| 401 | The user needs to be logged in | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
User update_current_user()
Return the user details for the current user
- Bearer (JWT) Authentication (jwt):
import ibutsu_client
from ibutsu_client.models.user import User
from ibutsu_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api
# See configuration.py for a list of all supported configuration parameters.
configuration = ibutsu_client.Configuration(
host = "/api"
)
# 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 Bearer authorization (JWT): jwt
configuration = ibutsu_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with ibutsu_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ibutsu_client.UserApi(api_client)
try:
# Return the user details for the current user
api_response = api_instance.update_current_user()
print("The response of UserApi->update_current_user:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling UserApi->update_current_user: %s\n" % e)This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | The details of the logged in user | - |
| 401 | The user needs to be logged in | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]