All URIs are relative to https://api.brevo.com/v3
Method | HTTP request | Description |
---|---|---|
get_account | GET /account | Get your account information, plan and credits details |
get_account_activity | GET /organization/activities | Get user activity logs |
GetAccount get_account()
Get your account information, plan and credits details
from __future__ import print_function
import time
import brevo_python
from brevo_python.rest import ApiException
from pprint import pprint
# Configure API key authorization: api-key
configuration = brevo_python.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
configuration = brevo_python.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'
# create an instance of the API class
api_instance = brevo_python.AccountApi(brevo_python.ApiClient(configuration))
try:
# Get your account information, plan and credits details
api_response = api_instance.get_account()
pprint(api_response)
except ApiException as e:
print("Exception when calling AccountApi->get_account: %s\n" % e)
This endpoint does not need any parameter.
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetAccountActivity get_account_activity(start_date=start_date, end_date=end_date, limit=limit, offset=offset)
Get user activity logs
from __future__ import print_function
import time
import brevo_python
from brevo_python.rest import ApiException
from pprint import pprint
# Configure API key authorization: api-key
configuration = brevo_python.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
configuration = brevo_python.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'
# create an instance of the API class
api_instance = brevo_python.AccountApi(brevo_python.ApiClient(configuration))
start_date = 'start_date_example' # str | Mandatory if endDate is used. Enter start date in UTC date (YYYY-MM-DD) format to filter the activity in your account. Maximum time period that can be selected is one month. Additionally, you can retrieve activity logs from the past 12 months from the date of your search. (optional)
end_date = 'end_date_example' # str | Mandatory if startDate is used. Enter end date in UTC date (YYYY-MM-DD) format to filter the activity in your account. Maximum time period that can be selected is one month. (optional)
limit = 10 # int | Number of documents per page (optional) (default to 10)
offset = 0 # int | Index of the first document in the page. (optional) (default to 0)
try:
# Get user activity logs
api_response = api_instance.get_account_activity(start_date=start_date, end_date=end_date, limit=limit, offset=offset)
pprint(api_response)
except ApiException as e:
print("Exception when calling AccountApi->get_account_activity: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
start_date | str | Mandatory if endDate is used. Enter start date in UTC date (YYYY-MM-DD) format to filter the activity in your account. Maximum time period that can be selected is one month. Additionally, you can retrieve activity logs from the past 12 months from the date of your search. | [optional] |
end_date | str | Mandatory if startDate is used. Enter end date in UTC date (YYYY-MM-DD) format to filter the activity in your account. Maximum time period that can be selected is one month. | [optional] |
limit | int | Number of documents per page | [optional] [default to 10] |
offset | int | Index of the first document in the page. | [optional] [default to 0] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]