1
1
#
2
- # Copyright (c) 2018-2023 , FusionAuth, All Rights Reserved
2
+ # Copyright (c) 2018-2025 , FusionAuth, All Rights Reserved
3
3
#
4
4
# Licensed under the Apache License, Version 2.0 (the "License");
5
5
# you may not use this file except in compliance with the License.
@@ -748,7 +748,7 @@ def deactivate_user_action(self, user_action_id):
748
748
@deprecated ("This method has been renamed to deactivate_users_by_ids, use that method instead." )
749
749
def deactivate_users (self , user_ids ):
750
750
"""
751
- Deactivates the users with the given ids .
751
+ Deactivates the users with the given Ids .
752
752
753
753
Attributes:
754
754
user_ids: The ids of the users to deactivate.
@@ -762,7 +762,7 @@ def deactivate_users(self, user_ids):
762
762
763
763
def deactivate_users_by_ids (self , user_ids ):
764
764
"""
765
- Deactivates the users with the given ids .
765
+ Deactivates the users with the given Ids .
766
766
767
767
Attributes:
768
768
user_ids: The ids of the users to deactivate.
@@ -1205,8 +1205,8 @@ def delete_user_with_request(self, user_id, request):
1205
1205
@deprecated ("This method has been renamed to delete_users_by_query, use that method instead." )
1206
1206
def delete_users (self , request ):
1207
1207
"""
1208
- Deletes the users with the given ids , or users matching the provided JSON query or queryString.
1209
- The order of preference is ids , query and then queryString, it is recommended to only provide one of the three for the request.
1208
+ Deletes the users with the given Ids , or users matching the provided JSON query or queryString.
1209
+ The order of preference is Ids , query and then queryString, it is recommended to only provide one of the three for the request.
1210
1210
1211
1211
This method can be used to deactivate or permanently delete (hard-delete) users based upon the hardDelete boolean in the request body.
1212
1212
Using the dryRun parameter you may also request the result of the action without actually deleting or deactivating any users.
@@ -1221,8 +1221,8 @@ def delete_users(self, request):
1221
1221
1222
1222
def delete_users_by_query (self , request ):
1223
1223
"""
1224
- Deletes the users with the given ids , or users matching the provided JSON query or queryString.
1225
- The order of preference is ids , query and then queryString, it is recommended to only provide one of the three for the request.
1224
+ Deletes the users with the given Ids , or users matching the provided JSON query or queryString.
1225
+ The order of preference is Ids , query and then queryString, it is recommended to only provide one of the three for the request.
1226
1226
1227
1227
This method can be used to deactivate or permanently delete (hard-delete) users based upon the hardDelete boolean in the request body.
1228
1228
Using the dryRun parameter you may also request the result of the action without actually deleting or deactivating any users.
@@ -1744,7 +1744,7 @@ def modify_action(self, action_id, request):
1744
1744
action.
1745
1745
1746
1746
Attributes:
1747
- action_id: The Id of the action to modify. This is technically the user action log id .
1747
+ action_id: The Id of the action to modify. This is technically the user action log Id .
1748
1748
request: The request that contains all the information about the modification.
1749
1749
"""
1750
1750
return self .start ().uri ('/api/user/action' ) \
@@ -1767,16 +1767,16 @@ def passwordless_login(self, request):
1767
1767
1768
1768
def patch_api_key (self , key_id , request ):
1769
1769
"""
1770
- Updates an authentication API key by given id
1770
+ Updates an API key with the given Id.
1771
1771
1772
1772
Attributes:
1773
- key_id: The Id of the authentication key. If not provided a secure random api key will be generated.
1774
- request: The request object that contains all the information needed to create the APIKey .
1773
+ key_id: The Id of the API key. If not provided a secure random api key will be generated.
1774
+ request: The request object that contains all the information needed to create the API key .
1775
1775
"""
1776
1776
return self .start ().uri ('/api/api-key' ) \
1777
1777
.url_segment (key_id ) \
1778
1778
.body_handler (JSONBodyHandler (request )) \
1779
- .post () \
1779
+ .patch () \
1780
1780
.go ()
1781
1781
1782
1782
def patch_application (self , application_id , request ):
@@ -2285,7 +2285,7 @@ def reindex(self, request):
2285
2285
2286
2286
def remove_user_from_family (self , family_id , user_id ):
2287
2287
"""
2288
- Removes a user from the family with the given id .
2288
+ Removes a user from the family with the given Id .
2289
2289
2290
2290
Attributes:
2291
2291
family_id: The Id of the family to remove the user from.
@@ -2340,7 +2340,7 @@ def resend_registration_verification(self, email, application_id):
2340
2340
2341
2341
def retrieve_api_key (self , key_id ):
2342
2342
"""
2343
- Retrieves an authentication API key for the given id
2343
+ Retrieves an authentication API key for the given Id.
2344
2344
2345
2345
Attributes:
2346
2346
key_id: The Id of the API key to retrieve.
@@ -2407,7 +2407,7 @@ def retrieve_application(self, application_id=None):
2407
2407
Retrieves the application for the given Id or all the applications if the Id is null.
2408
2408
2409
2409
Attributes:
2410
- application_id: (Optional) The application id .
2410
+ application_id: (Optional) The application Id .
2411
2411
"""
2412
2412
return self .start ().uri ('/api/application' ) \
2413
2413
.url_segment (application_id ) \
@@ -2482,11 +2482,11 @@ def retrieve_consents(self):
2482
2482
2483
2483
def retrieve_daily_active_report (self , start , end , application_id = None ):
2484
2484
"""
2485
- Retrieves the daily active user report between the two instants. If you specify an application id , it will only
2485
+ Retrieves the daily active user report between the two instants. If you specify an application Id , it will only
2486
2486
return the daily active counts for that application.
2487
2487
2488
2488
Attributes:
2489
- application_id: (Optional) The application id .
2489
+ application_id: (Optional) The application Id .
2490
2490
start: The start instant as UTC milliseconds since Epoch.
2491
2491
end: The end instant as UTC milliseconds since Epoch.
2492
2492
"""
@@ -2499,7 +2499,7 @@ def retrieve_daily_active_report(self, start, end, application_id=None):
2499
2499
2500
2500
def retrieve_email_template (self , email_template_id = None ):
2501
2501
"""
2502
- Retrieves the email template for the given Id. If you don't specify the id , this will return all the email templates.
2502
+ Retrieves the email template for the given Id. If you don't specify the Id , this will return all the email templates.
2503
2503
2504
2504
Attributes:
2505
2505
email_template_id: (Optional) The Id of the email template.
@@ -2882,11 +2882,11 @@ def retrieve_lambdas_by_type(self, _type):
2882
2882
2883
2883
def retrieve_login_report (self , start , end , application_id = None ):
2884
2884
"""
2885
- Retrieves the login report between the two instants. If you specify an application id , it will only return the
2885
+ Retrieves the login report between the two instants. If you specify an application Id , it will only return the
2886
2886
login counts for that application.
2887
2887
2888
2888
Attributes:
2889
- application_id: (Optional) The application id .
2889
+ application_id: (Optional) The application Id .
2890
2890
start: The start instant as UTC milliseconds since Epoch.
2891
2891
end: The end instant as UTC milliseconds since Epoch.
2892
2892
"""
@@ -2899,7 +2899,7 @@ def retrieve_login_report(self, start, end, application_id=None):
2899
2899
2900
2900
def retrieve_message_template (self , message_template_id = None ):
2901
2901
"""
2902
- Retrieves the message template for the given Id. If you don't specify the id , this will return all the message templates.
2902
+ Retrieves the message template for the given Id. If you don't specify the Id , this will return all the message templates.
2903
2903
2904
2904
Attributes:
2905
2905
message_template_id: (Optional) The Id of the message template.
@@ -2955,11 +2955,11 @@ def retrieve_messengers(self):
2955
2955
2956
2956
def retrieve_monthly_active_report (self , start , end , application_id = None ):
2957
2957
"""
2958
- Retrieves the monthly active user report between the two instants. If you specify an application id , it will only
2958
+ Retrieves the monthly active user report between the two instants. If you specify an application Id , it will only
2959
2959
return the monthly active counts for that application.
2960
2960
2961
2961
Attributes:
2962
- application_id: (Optional) The application id .
2962
+ application_id: (Optional) The application Id .
2963
2963
start: The start instant as UTC milliseconds since Epoch.
2964
2964
end: The end instant as UTC milliseconds since Epoch.
2965
2965
"""
@@ -3121,7 +3121,7 @@ def retrieve_refresh_tokens(self, user_id):
3121
3121
3122
3122
def retrieve_registration (self , user_id , application_id ):
3123
3123
"""
3124
- Retrieves the user registration for the user with the given Id and the given application id .
3124
+ Retrieves the user registration for the user with the given Id and the given application Id .
3125
3125
3126
3126
Attributes:
3127
3127
user_id: The Id of the user.
@@ -3135,11 +3135,11 @@ def retrieve_registration(self, user_id, application_id):
3135
3135
3136
3136
def retrieve_registration_report (self , start , end , application_id = None ):
3137
3137
"""
3138
- Retrieves the registration report between the two instants. If you specify an application id , it will only return
3138
+ Retrieves the registration report between the two instants. If you specify an application Id , it will only return
3139
3139
the registration counts for that application.
3140
3140
3141
3141
Attributes:
3142
- application_id: (Optional) The application id .
3142
+ application_id: (Optional) The application Id .
3143
3143
start: The start instant as UTC milliseconds since Epoch.
3144
3144
end: The end instant as UTC milliseconds since Epoch.
3145
3145
"""
@@ -3301,7 +3301,7 @@ def retrieve_user(self, user_id):
3301
3301
3302
3302
def retrieve_user_action (self , user_action_id = None ):
3303
3303
"""
3304
- Retrieves the user action for the given Id. If you pass in null for the id , this will return all the user
3304
+ Retrieves the user action for the given Id. If you pass in null for the Id , this will return all the user
3305
3305
actions.
3306
3306
3307
3307
Attributes:
@@ -3314,7 +3314,7 @@ def retrieve_user_action(self, user_action_id=None):
3314
3314
3315
3315
def retrieve_user_action_reason (self , user_action_reason_id = None ):
3316
3316
"""
3317
- Retrieves the user action reason for the given Id. If you pass in null for the id , this will return all the user
3317
+ Retrieves the user action reason for the given Id. If you pass in null for the Id , this will return all the user
3318
3318
action reasons.
3319
3319
3320
3320
Attributes:
@@ -3414,8 +3414,8 @@ def retrieve_user_code(self, client_id, client_secret, user_code):
3414
3414
This API is useful if you want to build your own login workflow to complete a device grant.
3415
3415
3416
3416
Attributes:
3417
- client_id: The client id .
3418
- client_secret: The client id .
3417
+ client_id: The client Id .
3418
+ client_secret: The client Id .
3419
3419
user_code: The end-user verification code.
3420
3420
"""
3421
3421
body = {
@@ -3527,12 +3527,12 @@ def retrieve_user_links_by_user_id(self, user_id, identity_provider_id=None):
3527
3527
3528
3528
def retrieve_user_login_report (self , user_id , start , end , application_id = None ):
3529
3529
"""
3530
- Retrieves the login report between the two instants for a particular user by Id. If you specify an application id , it will only return the
3530
+ Retrieves the login report between the two instants for a particular user by Id. If you specify an application Id , it will only return the
3531
3531
login counts for that application.
3532
3532
3533
3533
Attributes:
3534
- application_id: (Optional) The application id .
3535
- user_id: The userId id .
3534
+ application_id: (Optional) The application Id .
3535
+ user_id: The userId Id .
3536
3536
start: The start instant as UTC milliseconds since Epoch.
3537
3537
end: The end instant as UTC milliseconds since Epoch.
3538
3538
"""
@@ -3546,12 +3546,12 @@ def retrieve_user_login_report(self, user_id, start, end, application_id=None):
3546
3546
3547
3547
def retrieve_user_login_report_by_login_id (self , login_id , start , end , application_id = None ):
3548
3548
"""
3549
- Retrieves the login report between the two instants for a particular user by login Id. If you specify an application id , it will only return the
3549
+ Retrieves the login report between the two instants for a particular user by login Id. If you specify an application Id , it will only return the
3550
3550
login counts for that application.
3551
3551
3552
3552
Attributes:
3553
- application_id: (Optional) The application id .
3554
- login_id: The userId id .
3553
+ application_id: (Optional) The application Id .
3554
+ login_id: The userId Id .
3555
3555
start: The start instant as UTC milliseconds since Epoch.
3556
3556
end: The end instant as UTC milliseconds since Epoch.
3557
3557
"""
@@ -3627,7 +3627,7 @@ def retrieve_web_authn_credentials_for_user(self, user_id):
3627
3627
3628
3628
def retrieve_webhook (self , webhook_id = None ):
3629
3629
"""
3630
- Retrieves the webhook for the given Id. If you pass in null for the id , this will return all the webhooks.
3630
+ Retrieves the webhook for the given Id. If you pass in null for the Id , this will return all the webhooks.
3631
3631
3632
3632
Attributes:
3633
3633
webhook_id: (Optional) The Id of the webhook.
@@ -3859,7 +3859,7 @@ def search_entities(self, request):
3859
3859
3860
3860
def search_entities_by_ids (self , ids ):
3861
3861
"""
3862
- Retrieves the entities for the given ids . If any Id is invalid, it is ignored.
3862
+ Retrieves the entities for the given Ids . If any Id is invalid, it is ignored.
3863
3863
3864
3864
Attributes:
3865
3865
ids: The entity ids to search for.
@@ -4028,7 +4028,7 @@ def search_user_comments(self, request):
4028
4028
@deprecated ("This method has been renamed to search_users_by_ids, use that method instead." )
4029
4029
def search_users (self , ids ):
4030
4030
"""
4031
- Retrieves the users for the given ids . If any Id is invalid, it is ignored.
4031
+ Retrieves the users for the given Ids . If any Id is invalid, it is ignored.
4032
4032
4033
4033
Attributes:
4034
4034
ids: The user ids to search for.
@@ -4040,10 +4040,10 @@ def search_users(self, ids):
4040
4040
4041
4041
def search_users_by_ids (self , ids ):
4042
4042
"""
4043
- Retrieves the users for the given ids . If any Id is invalid, it is ignored.
4043
+ Retrieves the users for the given Ids . If any Id is invalid, it is ignored.
4044
4044
4045
4045
Attributes:
4046
- ids: The user ids to search for.
4046
+ ids: The user Ids to search for.
4047
4047
"""
4048
4048
return self .start ().uri ('/api/user/search' ) \
4049
4049
.url_parameter ('ids' , self .convert_true_false (ids )) \
@@ -4103,7 +4103,7 @@ def search_webhooks(self, request):
4103
4103
4104
4104
def send_email (self , email_template_id , request ):
4105
4105
"""
4106
- Send an email using an email template id . You can optionally provide <code>requestData</code> to access key value
4106
+ Send an email using an email template Id . You can optionally provide <code>requestData</code> to access key value
4107
4107
pairs in the email template.
4108
4108
4109
4109
Attributes:
@@ -4271,16 +4271,16 @@ def two_factor_login(self, request):
4271
4271
.post () \
4272
4272
.go ()
4273
4273
4274
- def update_api_key (self , api_key_id , request ):
4274
+ def update_api_key (self , key_id , request ):
4275
4275
"""
4276
- Updates an API key by given id
4276
+ Updates an API key with the given Id.
4277
4277
4278
4278
Attributes:
4279
- api_key_id : The Id of the API key to update.
4280
- request: The request object that contains all the information used to create the API Key .
4279
+ key_id : The Id of the API key to update.
4280
+ request: The request that contains all the new API key information .
4281
4281
"""
4282
4282
return self .start ().uri ('/api/api-key' ) \
4283
- .url_segment (api_key_id ) \
4283
+ .url_segment (key_id ) \
4284
4284
.body_handler (JSONBodyHandler (request )) \
4285
4285
.put () \
4286
4286
.go ()
@@ -4730,7 +4730,7 @@ def validate_device(self, user_code, client_id):
4730
4730
4731
4731
Attributes:
4732
4732
user_code: The end-user verification code.
4733
- client_id: The client id .
4733
+ client_id: The client Id .
4734
4734
"""
4735
4735
return self .start_anonymous ().uri ('/oauth2/device/validate' ) \
4736
4736
.url_parameter ('user_code' , self .convert_true_false (user_code )) \
0 commit comments