All URIs are relative to https://api.contabo.com
Method | HTTP request | Description |
---|---|---|
retrieve_user_audits_list | GET /v1/users/audits | List history about your users (audit) |
ListUserAuditResponse retrieve_user_audits_list(x_request_id, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, user_id=user_id, request_id=request_id, changed_by=changed_by, start_date=start_date, end_date=end_date)
List history about your users (audit)
List and filter the history about your users.
- Bearer (JWT) Authentication (bearer):
import pfruck_contabo
from pfruck_contabo.models.list_user_audit_response import ListUserAuditResponse
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.UsersAuditsApi(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)
user_id = '6cdf5968-f9fe-4192-97c2-f349e813c5e8' # str | The identifier of the user. (optional)
request_id = 'D5FD9FAF-58C0-4406-8F46-F449B8E4FEC3' # str | The requestId of the API call which led to the change. (optional)
changed_by = '23cbb6d6-cb11-4330-bdff-7bb791df2e23' # str | changedBy of the user which led to the change. (optional)
start_date = 'Fri Jan 01 00:00:00 UTC 2021' # date | Start of search time range. (optional)
end_date = 'Fri Jan 01 00:00:00 UTC 2021' # date | End of search time range. (optional)
try:
# List history about your users (audit)
api_response = api_instance.retrieve_user_audits_list(x_request_id, x_trace_id=x_trace_id, page=page, size=size, order_by=order_by, user_id=user_id, request_id=request_id, changed_by=changed_by, start_date=start_date, end_date=end_date)
print("The response of UsersAuditsApi->retrieve_user_audits_list:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling UsersAuditsApi->retrieve_user_audits_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`. |
user_id | str | The identifier of the user. | [optional] |
request_id | str | The requestId of the API call which led to the change. | [optional] |
changed_by | str | changedBy of the user which led to the change. | [optional] |
start_date | date | Start of search time range. | [optional] |
end_date | date | End of search time range. | [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 audits. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]