Skip to content

Latest commit

 

History

History
190 lines (138 loc) · 15 KB

MandatorAdministrationApi.md

File metadata and controls

190 lines (138 loc) · 15 KB

swagger_client.MandatorAdministrationApi

All URIs are relative to https://localhost

Method HTTP request Description
change_client_credentials POST /api/v1/mandatorAdmin/changeClientCredentials Change client credentials
delete_users POST /api/v1/mandatorAdmin/deleteUsers Delete users
get_user_list GET /api/v1/mandatorAdmin/getUserList Get user list

change_client_credentials

change_client_credentials(body)

Change client credentials

Change the client_secret for any of your clients, including the mandator admin client. Must pass the mandator admin client's access_token.

NOTES:
• When you change a client's secret, then all of its existing access tokens will be revoked. User access tokens are not affected.
• finAPI is storing client secrets with a one-way encryption. A lost client secret can NOT be recovered.

Example

from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: finapi_auth
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.MandatorAdministrationApi(swagger_client.ApiClient(configuration))
body = swagger_client.ChangeClientCredentialsParams() # ChangeClientCredentialsParams | Parameters for changing client credentials

try:
    # Change client credentials
    api_instance.change_client_credentials(body)
except ApiException as e:
    print("Exception when calling MandatorAdministrationApi->change_client_credentials: %s\n" % e)

Parameters

Name Type Description Notes
body ChangeClientCredentialsParams Parameters for changing client credentials

Return type

void (empty response body)

Authorization

finapi_auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

delete_users

UserIdentifiersList delete_users(body)

Delete users

Delete one or several users, which are specified by a given list of identifiers. Must pass the mandator admin client's access_token.

NOTE: finAPI may fail to delete one (or several, or all) of the specified users. A user cannot get deleted when his data is currently locked by an internal process (for instance, update of a bank connection or transactions categorization). The response contains the identifiers of all users that could not get deleted, and all users that could get deleted, separated in two lists. The mandator admin client can retry the request at a later time for the users who could not get deleted.

Example

from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: finapi_auth
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.MandatorAdministrationApi(swagger_client.ApiClient(configuration))
body = swagger_client.UserIdentifiersParams() # UserIdentifiersParams | List of user identifiers

try:
    # Delete users
    api_response = api_instance.delete_users(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MandatorAdministrationApi->delete_users: %s\n" % e)

Parameters

Name Type Description Notes
body UserIdentifiersParams List of user identifiers

Return type

UserIdentifiersList

Authorization

finapi_auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

get_user_list

PageableUserInfoList get_user_list(min_registration_date=min_registration_date, max_registration_date=max_registration_date, min_deletion_date=min_deletion_date, max_deletion_date=max_deletion_date, min_last_active_date=min_last_active_date, max_last_active_date=max_last_active_date, include_monthly_stats=include_monthly_stats, monthly_stats_start_date=monthly_stats_start_date, monthly_stats_end_date=monthly_stats_end_date, is_deleted=is_deleted, page=page, per_page=per_page, order=order)

Get user list

Get a list of the users of the mandator that is authorized by the access_token. Must pass the mandator admin client's access_token. You can set optional search criteria to get only those users that you are interested in. If you do not specify any search criteria, then this service functions as a 'get all' service.

Note that the original user id is longer available in finAPI once a user has been deleted. Because of this, the userId of deleted users will be a distorted version of the original userId. For example, if the deleted user's id was originally 'user', then this service will return 'uXXr' as the userId.

Example

from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: finapi_auth
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.MandatorAdministrationApi(swagger_client.ApiClient(configuration))
min_registration_date = 'min_registration_date_example' # str | Lower bound for a user's registration date, in the format 'YYYY-MM-DD' (e.g. '2016-01-01'). If specified, then only users whose 'registrationDate' is equal to or later than the given date will be regarded. (optional)
max_registration_date = 'max_registration_date_example' # str | Upper bound for a user's registration date, in the format 'YYYY-MM-DD' (e.g. '2016-01-01'). If specified, then only users whose 'registrationDate' is equal to or earlier than the given date will be regarded. (optional)
min_deletion_date = 'min_deletion_date_example' # str | Lower bound for a user's deletion date, in the format 'YYYY-MM-DD' (e.g. '2016-01-01'). If specified, then only users whose 'deletionDate' is not null, and is equal to or later than the given date will be regarded. (optional)
max_deletion_date = 'max_deletion_date_example' # str | Upper bound for a user's deletion date, in the format 'YYYY-MM-DD' (e.g. '2016-01-01'). If specified, then only users whose 'deletionDate' is null, or is equal to or earlier than the given date will be regarded. (optional)
min_last_active_date = 'min_last_active_date_example' # str | Lower bound for a user's last active date, in the format 'YYYY-MM-DD' (e.g. '2016-01-01'). If specified, then only users whose 'lastActiveDate' is not null, and is equal to or later than the given date will be regarded. (optional)
max_last_active_date = 'max_last_active_date_example' # str | Upper bound for a user's last active date, in the format 'YYYY-MM-DD' (e.g. '2016-01-01'). If specified, then only users whose 'lastActiveDate' is null, or is equal to or earlier than the given date will be regarded. (optional)
include_monthly_stats = true # bool | Whether to include the 'monthlyStats' for the returned users. If not specified, then the field defaults to 'false'. (optional)
monthly_stats_start_date = 'monthly_stats_start_date_example' # str | Minimum bound for the monthly stats (=oldest month that should be included). Must be passed in the format 'YYYY-MM'. If not specified, then the monthly stats will go back up to the first month in which the user existed (date of the user's registration). Note that this field is only regarded if 'includeMonthlyStats' = true. (optional)
monthly_stats_end_date = 'monthly_stats_end_date_example' # str | Maximum bound for the monthly stats (=latest month that should be included). Must be passed in the format 'YYYY-MM'. If not specified, then the monthly stats will go up to either the current month (for active users), or up to the month of deletion (for deleted users). Note that this field is only regarded if  'includeMonthlyStats' = true. (optional)
is_deleted = true # bool | If NOT specified, then the service will regard both active and deleted users in the search. If set to 'true', then ONLY deleted users will be regarded. If set to 'false', then ONLY active users will be regarded. (optional)
page = 1 # int | Result page that you want to retrieve (optional) (default to 1)
per_page = 20 # int | Maximum number of records per page. Can be at most 500. NOTE: Due to its validation and visualization, the swagger frontend might show very low performance, or even crashes, when a service responds with a lot of data. It is recommended to use a HTTP client like Postman or DHC instead of our swagger frontend for service calls with large page sizes. (optional) (default to 20)
order = ['order_example'] # list[str] | Determines the order of the results. You can order the results by 'userId'. The default order for this service is 'userId,asc'. The general format is: 'property[,asc|desc]', with 'asc' being the default value.  (optional)

try:
    # Get user list
    api_response = api_instance.get_user_list(min_registration_date=min_registration_date, max_registration_date=max_registration_date, min_deletion_date=min_deletion_date, max_deletion_date=max_deletion_date, min_last_active_date=min_last_active_date, max_last_active_date=max_last_active_date, include_monthly_stats=include_monthly_stats, monthly_stats_start_date=monthly_stats_start_date, monthly_stats_end_date=monthly_stats_end_date, is_deleted=is_deleted, page=page, per_page=per_page, order=order)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MandatorAdministrationApi->get_user_list: %s\n" % e)

Parameters

Name Type Description Notes
min_registration_date str Lower bound for a user's registration date, in the format 'YYYY-MM-DD' (e.g. '2016-01-01'). If specified, then only users whose 'registrationDate' is equal to or later than the given date will be regarded. [optional]
max_registration_date str Upper bound for a user's registration date, in the format 'YYYY-MM-DD' (e.g. '2016-01-01'). If specified, then only users whose 'registrationDate' is equal to or earlier than the given date will be regarded. [optional]
min_deletion_date str Lower bound for a user's deletion date, in the format 'YYYY-MM-DD' (e.g. '2016-01-01'). If specified, then only users whose 'deletionDate' is not null, and is equal to or later than the given date will be regarded. [optional]
max_deletion_date str Upper bound for a user's deletion date, in the format 'YYYY-MM-DD' (e.g. '2016-01-01'). If specified, then only users whose 'deletionDate' is null, or is equal to or earlier than the given date will be regarded. [optional]
min_last_active_date str Lower bound for a user's last active date, in the format 'YYYY-MM-DD' (e.g. '2016-01-01'). If specified, then only users whose 'lastActiveDate' is not null, and is equal to or later than the given date will be regarded. [optional]
max_last_active_date str Upper bound for a user's last active date, in the format 'YYYY-MM-DD' (e.g. '2016-01-01'). If specified, then only users whose 'lastActiveDate' is null, or is equal to or earlier than the given date will be regarded. [optional]
include_monthly_stats bool Whether to include the 'monthlyStats' for the returned users. If not specified, then the field defaults to 'false'. [optional]
monthly_stats_start_date str Minimum bound for the monthly stats (=oldest month that should be included). Must be passed in the format 'YYYY-MM'. If not specified, then the monthly stats will go back up to the first month in which the user existed (date of the user's registration). Note that this field is only regarded if 'includeMonthlyStats' = true. [optional]
monthly_stats_end_date str Maximum bound for the monthly stats (=latest month that should be included). Must be passed in the format 'YYYY-MM'. If not specified, then the monthly stats will go up to either the current month (for active users), or up to the month of deletion (for deleted users). Note that this field is only regarded if 'includeMonthlyStats' = true. [optional]
is_deleted bool If NOT specified, then the service will regard both active and deleted users in the search. If set to 'true', then ONLY deleted users will be regarded. If set to 'false', then ONLY active users will be regarded. [optional]
page int Result page that you want to retrieve [optional] [default to 1]
per_page int Maximum number of records per page. Can be at most 500. NOTE: Due to its validation and visualization, the swagger frontend might show very low performance, or even crashes, when a service responds with a lot of data. It is recommended to use a HTTP client like Postman or DHC instead of our swagger frontend for service calls with large page sizes. [optional] [default to 20]
order list[str] Determines the order of the results. You can order the results by 'userId'. The default order for this service is 'userId,asc'. The general format is: 'property[,asc desc]', with 'asc' being the default value.

Return type

PageableUserInfoList

Authorization

finapi_auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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