All URIs are relative to https://api.contabo.com
Method | HTTP request | Description |
---|---|---|
create_user | POST /v1/users | Create a new user |
delete_user | DELETE /v1/users/{userId} | Delete existing user by id |
generate_client_secret | PUT /v1/users/client/secret | Generate new client secret |
get_object_storage_credentials | GET /v1/users/{userId}/object-storages/{objectStorageId}/credentials/{credentialId} | Get S3 compatible object storage credentials. |
list_object_storage_credentials | GET /v1/users/{userId}/object-storages/credentials | Get list of S3 compatible object storage credentials for user. |
regenerate_object_storage_credentials | PATCH /v1/users/{userId}/object-storages/{objectStorageId}/credentials/{credentialId} | Regenerates secret key of specified user for the S3 compatible object storages. |
resend_email_verification | POST /v1/users/{userId}/resend-email-verification | Resend email verification |
reset_password | POST /v1/users/{userId}/reset-password | Send reset password email |
retrieve_user | GET /v1/users/{userId} | Get specific user by id |
retrieve_user_client | GET /v1/users/client | Get client |
retrieve_user_list | GET /v1/users | List users |
update_user | PATCH /v1/users/{userId} | Update specific user by id |
CreateUserResponse create_user(x_request_id, create_user_request, x_trace_id=x_trace_id)
Create a new user
Create a new user with required attributes name, email, enabled, totp (=Two-factor authentication 2FA), admin (=access to all endpoints and resources), accessAllResources and roles. You can't specify any password / secrets for the user. For security reasons the user will have to specify secrets on his own.
- Bearer (JWT) Authentication (bearer):
import pfruck_contabo
from pfruck_contabo.models.create_user_request import CreateUserRequest
from pfruck_contabo.models.create_user_response import CreateUserResponse
from pfruck_contabo.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.contabo.com
# See configuration.py for a list of all supported configuration parameters.
configuration = pfruck_contabo.Configuration(
host = "https://api.contabo.com"
)
# 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): bearer
configuration = pfruck_contabo.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with pfruck_contabo.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pfruck_contabo.UsersApi(api_client)
x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.
create_user_request = pfruck_contabo.CreateUserRequest() # CreateUserRequest |
x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional)
try:
# Create a new user
api_response = api_instance.create_user(x_request_id, create_user_request, x_trace_id=x_trace_id)
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)
Name | Type | Description | Notes |
---|---|---|---|
x_request_id | str | Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. | |
create_user_request | CreateUserRequest | ||
x_trace_id | str | Identifier to trace group of requests. | [optional] |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
201 | The response will be a JSON object and contains standard user attributes. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete_user(x_request_id, user_id, x_trace_id=x_trace_id)
Delete existing user by id
By deleting a user he will not be able to access any endpoints or resources any longer. In order to temporarily disable a user please update its enabled
attribute.
- Bearer (JWT) Authentication (bearer):
import pfruck_contabo
from pfruck_contabo.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.contabo.com
# See configuration.py for a list of all supported configuration parameters.
configuration = pfruck_contabo.Configuration(
host = "https://api.contabo.com"
)
# 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): bearer
configuration = pfruck_contabo.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with pfruck_contabo.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pfruck_contabo.UsersApi(api_client)
x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.
user_id = '6cdf5968-f9fe-4192-97c2-f349e813c5e8' # str | The identifier of the user.
x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional)
try:
# Delete existing user by id
api_instance.delete_user(x_request_id, user_id, x_trace_id=x_trace_id)
except Exception as e:
print("Exception when calling UsersApi->delete_user: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
x_request_id | str | Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. | |
user_id | str | The identifier of the user. | |
x_trace_id | str | Identifier to trace group of requests. | [optional] |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
Status code | Description | Response headers |
---|---|---|
204 | Response body has no content | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GenerateClientSecretResponse generate_client_secret(x_request_id, x_trace_id=x_trace_id)
Generate new client secret
Generate and get new client secret.
- Bearer (JWT) Authentication (bearer):
import pfruck_contabo
from pfruck_contabo.models.generate_client_secret_response import GenerateClientSecretResponse
from pfruck_contabo.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.contabo.com
# See configuration.py for a list of all supported configuration parameters.
configuration = pfruck_contabo.Configuration(
host = "https://api.contabo.com"
)
# 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): bearer
configuration = pfruck_contabo.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with pfruck_contabo.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pfruck_contabo.UsersApi(api_client)
x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.
x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional)
try:
# Generate new client secret
api_response = api_instance.generate_client_secret(x_request_id, x_trace_id=x_trace_id)
print("The response of UsersApi->generate_client_secret:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling UsersApi->generate_client_secret: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
x_request_id | str | Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. | |
x_trace_id | str | Identifier to trace group of requests. | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | The response will be a JSON object and contains new client secret. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FindCredentialResponse get_object_storage_credentials(x_request_id, user_id, object_storage_id, credential_id, x_trace_id=x_trace_id)
Get S3 compatible object storage credentials.
Get S3 compatible object storage credentials for accessing it via S3 compatible tools like aws
cli.
- Bearer (JWT) Authentication (bearer):
import pfruck_contabo
from pfruck_contabo.models.find_credential_response import FindCredentialResponse
from pfruck_contabo.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.contabo.com
# See configuration.py for a list of all supported configuration parameters.
configuration = pfruck_contabo.Configuration(
host = "https://api.contabo.com"
)
# 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): bearer
configuration = pfruck_contabo.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with pfruck_contabo.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pfruck_contabo.UsersApi(api_client)
x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.
user_id = '6cdf5968-f9fe-4192-97c2-f349e813c5e8' # str | The identifier of the user.
object_storage_id = 'd8417276-d2d9-43a9-a0a8-9a6fa6060246' # str | The identifier of the S3 object storage
credential_id = 12345 # int | The ID of the object storage credential
x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional)
try:
# Get S3 compatible object storage credentials.
api_response = api_instance.get_object_storage_credentials(x_request_id, user_id, object_storage_id, credential_id, x_trace_id=x_trace_id)
print("The response of UsersApi->get_object_storage_credentials:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling UsersApi->get_object_storage_credentials: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
x_request_id | str | Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. | |
user_id | str | The identifier of the user. | |
object_storage_id | str | The identifier of the S3 object storage | |
credential_id | int | The ID of the object storage credential | |
x_trace_id | str | Identifier to trace group of requests. | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | The response will be a JSON object and contains S3 credentials. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListCredentialResponse list_object_storage_credentials(x_request_id, user_id, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, object_storage_id=object_storage_id, region_name=region_name, display_name=display_name)
Get list of S3 compatible object storage credentials for user.
Get list of S3 compatible object storage credentials for accessing it via S3 compatible tools like aws
cli.
- Bearer (JWT) Authentication (bearer):
import pfruck_contabo
from pfruck_contabo.models.list_credential_response import ListCredentialResponse
from pfruck_contabo.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.contabo.com
# See configuration.py for a list of all supported configuration parameters.
configuration = pfruck_contabo.Configuration(
host = "https://api.contabo.com"
)
# 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): bearer
configuration = pfruck_contabo.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with pfruck_contabo.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pfruck_contabo.UsersApi(api_client)
x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.
user_id = '6cdf5968-f9fe-4192-97c2-f349e813c5e8' # str | The identifier of the user.
x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional)
page = 1 # int | Number of page to be fetched. (optional)
size = 10 # int | Number of elements per page. (optional)
order_by = ['name:asc'] # List[str] | Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. (optional)
object_storage_id = 'd8417276-d2d9-43a9-a0a8-9a6fa6060246' # str | The identifier of the S3 object storage (optional)
region_name = 'Asia (Singapore)' # str | Filter for Object Storage by regions. Available regions: Asia (Singapore), European Union, United States (Central) (optional)
display_name = 'Object Storage EU 420' # str | Filter for Object Storage by his displayName. (optional)
try:
# Get list of S3 compatible object storage credentials for user.
api_response = api_instance.list_object_storage_credentials(x_request_id, user_id, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, object_storage_id=object_storage_id, region_name=region_name, display_name=display_name)
print("The response of UsersApi->list_object_storage_credentials:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling UsersApi->list_object_storage_credentials: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
x_request_id | str | Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. | |
user_id | str | The identifier of the user. | |
x_trace_id | str | Identifier to trace group of requests. | [optional] |
page | int | Number of page to be fetched. | [optional] |
size | int | Number of elements per page. | [optional] |
order_by | List[str] | Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC | DESC`. |
object_storage_id | str | The identifier of the S3 object storage | [optional] |
region_name | str | Filter for Object Storage by regions. Available regions: Asia (Singapore), European Union, United States (Central) | [optional] |
display_name | str | Filter for Object Storage by his displayName. | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | The response will be an array of JSON objects that contains S3 credentials. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FindCredentialResponse regenerate_object_storage_credentials(x_request_id, user_id, object_storage_id, credential_id, x_trace_id=x_trace_id)
Regenerates secret key of specified user for the S3 compatible object storages.
Regenerates secret key of specified user for the a specific S3 compatible object storages.
- Bearer (JWT) Authentication (bearer):
import pfruck_contabo
from pfruck_contabo.models.find_credential_response import FindCredentialResponse
from pfruck_contabo.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.contabo.com
# See configuration.py for a list of all supported configuration parameters.
configuration = pfruck_contabo.Configuration(
host = "https://api.contabo.com"
)
# 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): bearer
configuration = pfruck_contabo.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with pfruck_contabo.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pfruck_contabo.UsersApi(api_client)
x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.
user_id = '6cdf5968-f9fe-4192-97c2-f349e813c5e8' # str | The identifier of the user.
object_storage_id = 'd8417276-d2d9-43a9-a0a8-9a6fa6060246' # str | The identifier of the S3 object storage
credential_id = 12345 # int | The ID of the object storage credential
x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional)
try:
# Regenerates secret key of specified user for the S3 compatible object storages.
api_response = api_instance.regenerate_object_storage_credentials(x_request_id, user_id, object_storage_id, credential_id, x_trace_id=x_trace_id)
print("The response of UsersApi->regenerate_object_storage_credentials:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling UsersApi->regenerate_object_storage_credentials: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
x_request_id | str | Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. | |
user_id | str | The identifier of the user. | |
object_storage_id | str | The identifier of the S3 object storage | |
credential_id | int | The ID of the object storage credential | |
x_trace_id | str | Identifier to trace group of requests. | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | The response will be a JSON object and contains object storage S3 credentials. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
resend_email_verification(x_request_id, user_id, x_trace_id=x_trace_id, redirect_url=redirect_url)
Resend email verification
Resend email verification for a specific user
- Bearer (JWT) Authentication (bearer):
import pfruck_contabo
from pfruck_contabo.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.contabo.com
# See configuration.py for a list of all supported configuration parameters.
configuration = pfruck_contabo.Configuration(
host = "https://api.contabo.com"
)
# 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): bearer
configuration = pfruck_contabo.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with pfruck_contabo.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pfruck_contabo.UsersApi(api_client)
x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.
user_id = '6cdf5968-f9fe-4192-97c2-f349e813c5e8' # str | The identifier of the user.
x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional)
redirect_url = 'https://test.contabo.de' # str | The redirect url used for email verification (optional)
try:
# Resend email verification
api_instance.resend_email_verification(x_request_id, user_id, x_trace_id=x_trace_id, redirect_url=redirect_url)
except Exception as e:
print("Exception when calling UsersApi->resend_email_verification: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
x_request_id | str | Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. | |
user_id | str | The identifier of the user. | |
x_trace_id | str | Identifier to trace group of requests. | [optional] |
redirect_url | str | The redirect url used for email verification | [optional] |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
Status code | Description | Response headers |
---|---|---|
204 | Response body has no content | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
reset_password(x_request_id, user_id, x_trace_id=x_trace_id, redirect_url=redirect_url)
Send reset password email
Send reset password email for a specific user
- Bearer (JWT) Authentication (bearer):
import pfruck_contabo
from pfruck_contabo.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.contabo.com
# See configuration.py for a list of all supported configuration parameters.
configuration = pfruck_contabo.Configuration(
host = "https://api.contabo.com"
)
# 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): bearer
configuration = pfruck_contabo.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with pfruck_contabo.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pfruck_contabo.UsersApi(api_client)
x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.
user_id = '6cdf5968-f9fe-4192-97c2-f349e813c5e8' # str | The identifier of the user.
x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional)
redirect_url = 'https://test.contabo.de' # str | The redirect url used for resetting password (optional)
try:
# Send reset password email
api_instance.reset_password(x_request_id, user_id, x_trace_id=x_trace_id, redirect_url=redirect_url)
except Exception as e:
print("Exception when calling UsersApi->reset_password: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
x_request_id | str | Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. | |
user_id | str | The identifier of the user. | |
x_trace_id | str | Identifier to trace group of requests. | [optional] |
redirect_url | str | The redirect url used for resetting password | [optional] |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
Status code | Description | Response headers |
---|---|---|
204 | Response body has no content | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FindUserResponse retrieve_user(x_request_id, user_id, x_trace_id=x_trace_id)
Get specific user by id
Get attributes for a specific user.
- Bearer (JWT) Authentication (bearer):
import pfruck_contabo
from pfruck_contabo.models.find_user_response import FindUserResponse
from pfruck_contabo.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.contabo.com
# See configuration.py for a list of all supported configuration parameters.
configuration = pfruck_contabo.Configuration(
host = "https://api.contabo.com"
)
# 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): bearer
configuration = pfruck_contabo.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with pfruck_contabo.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pfruck_contabo.UsersApi(api_client)
x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.
user_id = '6cdf5968-f9fe-4192-97c2-f349e813c5e8' # str | The identifier of the user.
x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional)
try:
# Get specific user by id
api_response = api_instance.retrieve_user(x_request_id, user_id, x_trace_id=x_trace_id)
print("The response of UsersApi->retrieve_user:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling UsersApi->retrieve_user: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
x_request_id | str | Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. | |
user_id | str | The identifier of the user. | |
x_trace_id | str | Identifier to trace group of requests. | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | The response will be a JSON object and contains standard user attributes. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FindClientResponse retrieve_user_client(x_request_id, x_trace_id=x_trace_id)
Get client
Get idm client.
- Bearer (JWT) Authentication (bearer):
import pfruck_contabo
from pfruck_contabo.models.find_client_response import FindClientResponse
from pfruck_contabo.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.contabo.com
# See configuration.py for a list of all supported configuration parameters.
configuration = pfruck_contabo.Configuration(
host = "https://api.contabo.com"
)
# 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): bearer
configuration = pfruck_contabo.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with pfruck_contabo.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pfruck_contabo.UsersApi(api_client)
x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.
x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional)
try:
# Get client
api_response = api_instance.retrieve_user_client(x_request_id, x_trace_id=x_trace_id)
print("The response of UsersApi->retrieve_user_client:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling UsersApi->retrieve_user_client: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
x_request_id | str | Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. | |
x_trace_id | str | Identifier to trace group of requests. | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | The response will be a JSON object and contains standard client attributes. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListUserResponse retrieve_user_list(x_request_id, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, email=email, enabled=enabled, owner=owner)
List users
List and filter all your users.
- Bearer (JWT) Authentication (bearer):
import pfruck_contabo
from pfruck_contabo.models.list_user_response import ListUserResponse
from pfruck_contabo.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.contabo.com
# See configuration.py for a list of all supported configuration parameters.
configuration = pfruck_contabo.Configuration(
host = "https://api.contabo.com"
)
# 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): bearer
configuration = pfruck_contabo.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with pfruck_contabo.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pfruck_contabo.UsersApi(api_client)
x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.
x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional)
page = 1 # int | Number of page to be fetched. (optional)
size = 10 # int | Number of elements per page. (optional)
order_by = ['name:asc'] # List[str] | Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC|DESC`. (optional)
email = '[email protected]' # str | Filter as substring match for user emails. (optional)
enabled = true # bool | Filter if user is enabled or not. (optional)
owner = true # bool | Filter if user is owner or not. (optional)
try:
# List users
api_response = api_instance.retrieve_user_list(x_request_id, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, email=email, enabled=enabled, owner=owner)
print("The response of UsersApi->retrieve_user_list:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling UsersApi->retrieve_user_list: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
x_request_id | str | Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. | |
x_trace_id | str | Identifier to trace group of requests. | [optional] |
page | int | Number of page to be fetched. | [optional] |
size | int | Number of elements per page. | [optional] |
order_by | List[str] | Specify fields and ordering (ASC for ascending, DESC for descending) in following format `field:ASC | DESC`. |
str | Filter as substring match for user emails. | [optional] | |
enabled | bool | Filter if user is enabled or not. | [optional] |
owner | bool | Filter if user is owner or not. | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | The response will be a JSON object and contains a paginated list of users. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UpdateUserResponse update_user(x_request_id, user_id, update_user_request, x_trace_id=x_trace_id)
Update specific user by id
Update attributes of a user. You may only specify the attributes you want to change. If an attribute is not set, it will retain its original value.
- Bearer (JWT) Authentication (bearer):
import pfruck_contabo
from pfruck_contabo.models.update_user_request import UpdateUserRequest
from pfruck_contabo.models.update_user_response import UpdateUserResponse
from pfruck_contabo.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.contabo.com
# See configuration.py for a list of all supported configuration parameters.
configuration = pfruck_contabo.Configuration(
host = "https://api.contabo.com"
)
# 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): bearer
configuration = pfruck_contabo.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with pfruck_contabo.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pfruck_contabo.UsersApi(api_client)
x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.
user_id = '6cdf5968-f9fe-4192-97c2-f349e813c5e8' # str | The identifier of the user.
update_user_request = pfruck_contabo.UpdateUserRequest() # UpdateUserRequest |
x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional)
try:
# Update specific user by id
api_response = api_instance.update_user(x_request_id, user_id, update_user_request, x_trace_id=x_trace_id)
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)
Name | Type | Description | Notes |
---|---|---|---|
x_request_id | str | Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually. | |
user_id | str | The identifier of the user. | |
update_user_request | UpdateUserRequest | ||
x_trace_id | str | Identifier to trace group of requests. | [optional] |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | The response will be a JSON object and contains standard user attributes. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]