From 3b69a5186773d600755c682f47081fb636329566 Mon Sep 17 00:00:00 2001 From: Brian Pontarelli Date: Mon, 21 Apr 2025 10:57:53 -0600 Subject: [PATCH 1/9] Updated version for fusionauth-python-client to 1.57.1 --- build.savant | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.savant b/build.savant index 46805f2..447b901 100644 --- a/build.savant +++ b/build.savant @@ -14,7 +14,7 @@ * language governing permissions and limitations under the License. */ -project(group: "io.fusionauth", name: "fusionauth-python-client", version: "1.57.0", licenses: ["ApacheV2_0"]) { +project(group: "io.fusionauth", name: "fusionauth-python-client", version: "1.57.1", licenses: ["ApacheV2_0"]) { workflow { fetch { cache() diff --git a/setup.py b/setup.py index 8055b5a..9e396f2 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name="fusionauth-client", - version="1.57.0", + version="1.57.1", author="FusionAuth", author_email="dev@fusionauth.io", description="A client library for FusionAuth", From 22f8cf8ba548d79a0e1288efe6a73f25cfb14b34 Mon Sep 17 00:00:00 2001 From: Lyle Schemmerling Date: Wed, 4 Jun 2025 09:58:41 -0600 Subject: [PATCH 2/9] add changePasswordByJWT (#43) --- src/main/python/fusionauth/fusionauth_client.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/main/python/fusionauth/fusionauth_client.py b/src/main/python/fusionauth/fusionauth_client.py index 28876ab..e635856 100644 --- a/src/main/python/fusionauth/fusionauth_client.py +++ b/src/main/python/fusionauth/fusionauth_client.py @@ -129,6 +129,23 @@ def change_password(self, change_password_id, request): .post() \ .go() + def change_password_by_jwt(self, encoded_jwt, request): + """ + Changes a user's password using their access token (JWT) instead of the changePasswordId + A common use case for this method will be if you want to allow the user to change their own password. + + Remember to send refreshToken in the request body if you want to get a new refresh token when login using the returned oneTimePassword. + + Attributes: + encoded_jwt: The encoded JWT (access token). + request: The change password request that contains all the information used to change the password. + """ + return self.start_anonymous().uri('/api/user/change-password') \ + .authorization("Bearer " + encoded_jwt) \ + .body_handler(JSONBodyHandler(request)) \ + .post() \ + .go() + def change_password_by_identity(self, request): """ Changes a user's password using their identity (loginId and password). Using a loginId instead of the changePasswordId From adaa4c6b42f3c2e5f7675b25583dfbffe532eb14 Mon Sep 17 00:00:00 2001 From: Daniel DeGroff Date: Thu, 10 Jul 2025 16:03:19 -0600 Subject: [PATCH 3/9] Rebuild clients based due to changes in fusionauth-client-builder --- .../python/fusionauth/fusionauth_client.py | 96 +++++++++---------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/src/main/python/fusionauth/fusionauth_client.py b/src/main/python/fusionauth/fusionauth_client.py index e635856..3c82abb 100644 --- a/src/main/python/fusionauth/fusionauth_client.py +++ b/src/main/python/fusionauth/fusionauth_client.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2018-2023, FusionAuth, All Rights Reserved +# Copyright (c) 2018-2025, FusionAuth, All Rights Reserved # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -748,7 +748,7 @@ def deactivate_user_action(self, user_action_id): @deprecated("This method has been renamed to deactivate_users_by_ids, use that method instead.") def deactivate_users(self, user_ids): """ - Deactivates the users with the given ids. + Deactivates the users with the given Ids. Attributes: user_ids: The ids of the users to deactivate. @@ -762,7 +762,7 @@ def deactivate_users(self, user_ids): def deactivate_users_by_ids(self, user_ids): """ - Deactivates the users with the given ids. + Deactivates the users with the given Ids. Attributes: user_ids: The ids of the users to deactivate. @@ -1205,8 +1205,8 @@ def delete_user_with_request(self, user_id, request): @deprecated("This method has been renamed to delete_users_by_query, use that method instead.") def delete_users(self, request): """ - Deletes the users with the given ids, or users matching the provided JSON query or queryString. - The order of preference is ids, query and then queryString, it is recommended to only provide one of the three for the request. + Deletes the users with the given Ids, or users matching the provided JSON query or queryString. + The order of preference is Ids, query and then queryString, it is recommended to only provide one of the three for the request. This method can be used to deactivate or permanently delete (hard-delete) users based upon the hardDelete boolean in the request body. 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): def delete_users_by_query(self, request): """ - Deletes the users with the given ids, or users matching the provided JSON query or queryString. - The order of preference is ids, query and then queryString, it is recommended to only provide one of the three for the request. + Deletes the users with the given Ids, or users matching the provided JSON query or queryString. + The order of preference is Ids, query and then queryString, it is recommended to only provide one of the three for the request. This method can be used to deactivate or permanently delete (hard-delete) users based upon the hardDelete boolean in the request body. 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): action. Attributes: - action_id: The Id of the action to modify. This is technically the user action log id. + action_id: The Id of the action to modify. This is technically the user action log Id. request: The request that contains all the information about the modification. """ return self.start().uri('/api/user/action') \ @@ -1767,16 +1767,16 @@ def passwordless_login(self, request): def patch_api_key(self, key_id, request): """ - Updates an authentication API key by given id + Updates an API key with the given Id. Attributes: - key_id: The Id of the authentication key. If not provided a secure random api key will be generated. - request: The request object that contains all the information needed to create the APIKey. + key_id: The Id of the API key. If not provided a secure random api key will be generated. + request: The request object that contains all the information needed to create the API key. """ return self.start().uri('/api/api-key') \ .url_segment(key_id) \ .body_handler(JSONBodyHandler(request)) \ - .post() \ + .patch() \ .go() def patch_application(self, application_id, request): @@ -2285,7 +2285,7 @@ def reindex(self, request): def remove_user_from_family(self, family_id, user_id): """ - Removes a user from the family with the given id. + Removes a user from the family with the given Id. Attributes: family_id: The Id of the family to remove the user from. @@ -2340,7 +2340,7 @@ def resend_registration_verification(self, email, application_id): def retrieve_api_key(self, key_id): """ - Retrieves an authentication API key for the given id + Retrieves an authentication API key for the given Id. Attributes: key_id: The Id of the API key to retrieve. @@ -2407,7 +2407,7 @@ def retrieve_application(self, application_id=None): Retrieves the application for the given Id or all the applications if the Id is null. Attributes: - application_id: (Optional) The application id. + application_id: (Optional) The application Id. """ return self.start().uri('/api/application') \ .url_segment(application_id) \ @@ -2482,11 +2482,11 @@ def retrieve_consents(self): def retrieve_daily_active_report(self, start, end, application_id=None): """ - Retrieves the daily active user report between the two instants. If you specify an application id, it will only + Retrieves the daily active user report between the two instants. If you specify an application Id, it will only return the daily active counts for that application. Attributes: - application_id: (Optional) The application id. + application_id: (Optional) The application Id. start: The start instant as UTC milliseconds since Epoch. end: The end instant as UTC milliseconds since Epoch. """ @@ -2499,7 +2499,7 @@ def retrieve_daily_active_report(self, start, end, application_id=None): def retrieve_email_template(self, email_template_id=None): """ - Retrieves the email template for the given Id. If you don't specify the id, this will return all the email templates. + Retrieves the email template for the given Id. If you don't specify the Id, this will return all the email templates. Attributes: email_template_id: (Optional) The Id of the email template. @@ -2882,11 +2882,11 @@ def retrieve_lambdas_by_type(self, _type): def retrieve_login_report(self, start, end, application_id=None): """ - Retrieves the login report between the two instants. If you specify an application id, it will only return the + Retrieves the login report between the two instants. If you specify an application Id, it will only return the login counts for that application. Attributes: - application_id: (Optional) The application id. + application_id: (Optional) The application Id. start: The start instant as UTC milliseconds since Epoch. end: The end instant as UTC milliseconds since Epoch. """ @@ -2899,7 +2899,7 @@ def retrieve_login_report(self, start, end, application_id=None): def retrieve_message_template(self, message_template_id=None): """ - Retrieves the message template for the given Id. If you don't specify the id, this will return all the message templates. + Retrieves the message template for the given Id. If you don't specify the Id, this will return all the message templates. Attributes: message_template_id: (Optional) The Id of the message template. @@ -2955,11 +2955,11 @@ def retrieve_messengers(self): def retrieve_monthly_active_report(self, start, end, application_id=None): """ - Retrieves the monthly active user report between the two instants. If you specify an application id, it will only + Retrieves the monthly active user report between the two instants. If you specify an application Id, it will only return the monthly active counts for that application. Attributes: - application_id: (Optional) The application id. + application_id: (Optional) The application Id. start: The start instant as UTC milliseconds since Epoch. end: The end instant as UTC milliseconds since Epoch. """ @@ -3121,7 +3121,7 @@ def retrieve_refresh_tokens(self, user_id): def retrieve_registration(self, user_id, application_id): """ - Retrieves the user registration for the user with the given Id and the given application id. + Retrieves the user registration for the user with the given Id and the given application Id. Attributes: user_id: The Id of the user. @@ -3135,11 +3135,11 @@ def retrieve_registration(self, user_id, application_id): def retrieve_registration_report(self, start, end, application_id=None): """ - Retrieves the registration report between the two instants. If you specify an application id, it will only return + Retrieves the registration report between the two instants. If you specify an application Id, it will only return the registration counts for that application. Attributes: - application_id: (Optional) The application id. + application_id: (Optional) The application Id. start: The start instant as UTC milliseconds since Epoch. end: The end instant as UTC milliseconds since Epoch. """ @@ -3301,7 +3301,7 @@ def retrieve_user(self, user_id): def retrieve_user_action(self, user_action_id=None): """ - Retrieves the user action for the given Id. If you pass in null for the id, this will return all the user + Retrieves the user action for the given Id. If you pass in null for the Id, this will return all the user actions. Attributes: @@ -3314,7 +3314,7 @@ def retrieve_user_action(self, user_action_id=None): def retrieve_user_action_reason(self, user_action_reason_id=None): """ - Retrieves the user action reason for the given Id. If you pass in null for the id, this will return all the user + Retrieves the user action reason for the given Id. If you pass in null for the Id, this will return all the user action reasons. Attributes: @@ -3414,8 +3414,8 @@ def retrieve_user_code(self, client_id, client_secret, user_code): This API is useful if you want to build your own login workflow to complete a device grant. Attributes: - client_id: The client id. - client_secret: The client id. + client_id: The client Id. + client_secret: The client Id. user_code: The end-user verification code. """ body = { @@ -3527,12 +3527,12 @@ def retrieve_user_links_by_user_id(self, user_id, identity_provider_id=None): def retrieve_user_login_report(self, user_id, start, end, application_id=None): """ - 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 + 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 login counts for that application. Attributes: - application_id: (Optional) The application id. - user_id: The userId id. + application_id: (Optional) The application Id. + user_id: The userId Id. start: The start instant as UTC milliseconds since Epoch. end: The end instant as UTC milliseconds since Epoch. """ @@ -3546,12 +3546,12 @@ def retrieve_user_login_report(self, user_id, start, end, application_id=None): def retrieve_user_login_report_by_login_id(self, login_id, start, end, application_id=None): """ - 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 + 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 login counts for that application. Attributes: - application_id: (Optional) The application id. - login_id: The userId id. + application_id: (Optional) The application Id. + login_id: The userId Id. start: The start instant as UTC milliseconds since Epoch. end: The end instant as UTC milliseconds since Epoch. """ @@ -3627,7 +3627,7 @@ def retrieve_web_authn_credentials_for_user(self, user_id): def retrieve_webhook(self, webhook_id=None): """ - Retrieves the webhook for the given Id. If you pass in null for the id, this will return all the webhooks. + Retrieves the webhook for the given Id. If you pass in null for the Id, this will return all the webhooks. Attributes: webhook_id: (Optional) The Id of the webhook. @@ -3859,7 +3859,7 @@ def search_entities(self, request): def search_entities_by_ids(self, ids): """ - Retrieves the entities for the given ids. If any Id is invalid, it is ignored. + Retrieves the entities for the given Ids. If any Id is invalid, it is ignored. Attributes: ids: The entity ids to search for. @@ -4028,7 +4028,7 @@ def search_user_comments(self, request): @deprecated("This method has been renamed to search_users_by_ids, use that method instead.") def search_users(self, ids): """ - Retrieves the users for the given ids. If any Id is invalid, it is ignored. + Retrieves the users for the given Ids. If any Id is invalid, it is ignored. Attributes: ids: The user ids to search for. @@ -4040,10 +4040,10 @@ def search_users(self, ids): def search_users_by_ids(self, ids): """ - Retrieves the users for the given ids. If any Id is invalid, it is ignored. + Retrieves the users for the given Ids. If any Id is invalid, it is ignored. Attributes: - ids: The user ids to search for. + ids: The user Ids to search for. """ return self.start().uri('/api/user/search') \ .url_parameter('ids', self.convert_true_false(ids)) \ @@ -4103,7 +4103,7 @@ def search_webhooks(self, request): def send_email(self, email_template_id, request): """ - Send an email using an email template id. You can optionally provide requestData to access key value + Send an email using an email template Id. You can optionally provide requestData to access key value pairs in the email template. Attributes: @@ -4271,16 +4271,16 @@ def two_factor_login(self, request): .post() \ .go() - def update_api_key(self, api_key_id, request): + def update_api_key(self, key_id, request): """ - Updates an API key by given id + Updates an API key with the given Id. Attributes: - api_key_id: The Id of the API key to update. - request: The request object that contains all the information used to create the API Key. + key_id: The Id of the API key to update. + request: The request that contains all the new API key information. """ return self.start().uri('/api/api-key') \ - .url_segment(api_key_id) \ + .url_segment(key_id) \ .body_handler(JSONBodyHandler(request)) \ .put() \ .go() @@ -4730,7 +4730,7 @@ def validate_device(self, user_code, client_id): Attributes: user_code: The end-user verification code. - client_id: The client id. + client_id: The client Id. """ return self.start_anonymous().uri('/oauth2/device/validate') \ .url_parameter('user_code', self.convert_true_false(user_code)) \ From 3f6840c50731fe5cd0b6d151cfb9d9d0eae1661b Mon Sep 17 00:00:00 2001 From: FusionAuth Automation Date: Tue, 22 Jul 2025 19:55:35 +0000 Subject: [PATCH 4/9] Updated version for fusionauth-python-client to 1.58.1 --- build.savant | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.savant b/build.savant index 4d27c06..812a285 100644 --- a/build.savant +++ b/build.savant @@ -14,7 +14,7 @@ * language governing permissions and limitations under the License. */ -project(group: "io.fusionauth", name: "fusionauth-python-client", version: "1.58.0", licenses: ["ApacheV2_0"]) { +project(group: "io.fusionauth", name: "fusionauth-python-client", version: "1.58.1", licenses: ["ApacheV2_0"]) { workflow { fetch { cache() diff --git a/setup.py b/setup.py index b6b6bf0..d31a746 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name="fusionauth-client", - version="1.58.0", + version="1.58.1", author="FusionAuth", author_email="dev@fusionauth.io", description="A client library for FusionAuth", From 9acd61bc3ae0ce9722e6e918041c8d81892555a9 Mon Sep 17 00:00:00 2001 From: Lyle Schemmerling Date: Wed, 23 Jul 2025 08:45:14 -0600 Subject: [PATCH 5/9] changePasswordUsingJWT --- .../python/fusionauth/fusionauth_client.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/main/python/fusionauth/fusionauth_client.py b/src/main/python/fusionauth/fusionauth_client.py index 3c82abb..b4e2086 100644 --- a/src/main/python/fusionauth/fusionauth_client.py +++ b/src/main/python/fusionauth/fusionauth_client.py @@ -129,6 +129,7 @@ def change_password(self, change_password_id, request): .post() \ .go() + @deprecated("This method has been renamed to change_password_using_jwt, use that method instead.") def change_password_by_jwt(self, encoded_jwt, request): """ Changes a user's password using their access token (JWT) instead of the changePasswordId @@ -160,6 +161,23 @@ def change_password_by_identity(self, request): .post() \ .go() + def change_password_using_jwt(self, encoded_jwt, request): + """ + Changes a user's password using their access token (JWT) instead of the changePasswordId + A common use case for this method will be if you want to allow the user to change their own password. + + Remember to send refreshToken in the request body if you want to get a new refresh token when login using the returned oneTimePassword. + + Attributes: + encoded_jwt: The encoded JWT (access token). + request: The change password request that contains all the information used to change the password. + """ + return self.start_anonymous().uri('/api/user/change-password') \ + .authorization("Bearer " + encoded_jwt) \ + .body_handler(JSONBodyHandler(request)) \ + .post() \ + .go() + def check_change_password_using_id(self, change_password_id): """ Check to see if the user must obtain a Trust Token Id in order to complete a change password request. From 188db2c3df504e494fbb240eccb4786510b456c5 Mon Sep 17 00:00:00 2001 From: FusionAuth Automation Date: Wed, 23 Jul 2025 22:08:03 +0000 Subject: [PATCH 6/9] Updated version for fusionauth-python-client to 1.59.0 --- build.savant | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.savant b/build.savant index 812a285..3a7a890 100644 --- a/build.savant +++ b/build.savant @@ -14,7 +14,7 @@ * language governing permissions and limitations under the License. */ -project(group: "io.fusionauth", name: "fusionauth-python-client", version: "1.58.1", licenses: ["ApacheV2_0"]) { +project(group: "io.fusionauth", name: "fusionauth-python-client", version: "1.59.0", licenses: ["ApacheV2_0"]) { workflow { fetch { cache() diff --git a/setup.py b/setup.py index d31a746..bfd741f 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name="fusionauth-client", - version="1.58.1", + version="1.59.0", author="FusionAuth", author_email="dev@fusionauth.io", description="A client library for FusionAuth", From d03468d859266bdbf519e3c78c3e87dd74f7e5d4 Mon Sep 17 00:00:00 2001 From: FusionAuth Automation Date: Wed, 23 Jul 2025 23:20:44 +0000 Subject: [PATCH 7/9] Updated version for fusionauth-python-client to 1.58.2 --- build.savant | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.savant b/build.savant index 3a7a890..47f03e1 100644 --- a/build.savant +++ b/build.savant @@ -14,7 +14,7 @@ * language governing permissions and limitations under the License. */ -project(group: "io.fusionauth", name: "fusionauth-python-client", version: "1.59.0", licenses: ["ApacheV2_0"]) { +project(group: "io.fusionauth", name: "fusionauth-python-client", version: "1.58.2", licenses: ["ApacheV2_0"]) { workflow { fetch { cache() diff --git a/setup.py b/setup.py index bfd741f..627c6c9 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name="fusionauth-client", - version="1.59.0", + version="1.58.2", author="FusionAuth", author_email="dev@fusionauth.io", description="A client library for FusionAuth", From 5faa38d277086604cb07e98472730c614a5c71bc Mon Sep 17 00:00:00 2001 From: FusionAuth Automation Date: Thu, 24 Jul 2025 00:10:06 +0000 Subject: [PATCH 8/9] Updated version for fusionauth-python-client to 1.59.0 --- build.savant | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.savant b/build.savant index 47f03e1..3a7a890 100644 --- a/build.savant +++ b/build.savant @@ -14,7 +14,7 @@ * language governing permissions and limitations under the License. */ -project(group: "io.fusionauth", name: "fusionauth-python-client", version: "1.58.2", licenses: ["ApacheV2_0"]) { +project(group: "io.fusionauth", name: "fusionauth-python-client", version: "1.59.0", licenses: ["ApacheV2_0"]) { workflow { fetch { cache() diff --git a/setup.py b/setup.py index 627c6c9..bfd741f 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name="fusionauth-client", - version="1.58.2", + version="1.59.0", author="FusionAuth", author_email="dev@fusionauth.io", description="A client library for FusionAuth", From ab29fdb513de639e5a0f9286aa115177db2ba72b Mon Sep 17 00:00:00 2001 From: Brady Wied Date: Thu, 24 Jul 2025 11:45:28 -0600 Subject: [PATCH 9/9] sb build follow up --- .../python/fusionauth/fusionauth_client.py | 114 ++++++++++-------- 1 file changed, 66 insertions(+), 48 deletions(-) diff --git a/src/main/python/fusionauth/fusionauth_client.py b/src/main/python/fusionauth/fusionauth_client.py index 4f34833..a8ad73f 100644 --- a/src/main/python/fusionauth/fusionauth_client.py +++ b/src/main/python/fusionauth/fusionauth_client.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2018-2023, FusionAuth, All Rights Reserved +# Copyright (c) 2018-2025, FusionAuth, All Rights Reserved # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -129,6 +129,7 @@ def change_password(self, change_password_id, request): .post() \ .go() + @deprecated("This method has been renamed to change_password_using_jwt, use that method instead.") def change_password_by_jwt(self, encoded_jwt, request): """ Changes a user's password using their access token (JWT) instead of the changePasswordId @@ -160,6 +161,23 @@ def change_password_by_identity(self, request): .post() \ .go() + def change_password_using_jwt(self, encoded_jwt, request): + """ + Changes a user's password using their access token (JWT) instead of the changePasswordId + A common use case for this method will be if you want to allow the user to change their own password. + + Remember to send refreshToken in the request body if you want to get a new refresh token when login using the returned oneTimePassword. + + Attributes: + encoded_jwt: The encoded JWT (access token). + request: The change password request that contains all the information used to change the password. + """ + return self.start_anonymous().uri('/api/user/change-password') \ + .authorization("Bearer " + encoded_jwt) \ + .body_handler(JSONBodyHandler(request)) \ + .post() \ + .go() + def check_change_password_using_id(self, change_password_id): """ Check to see if the user must obtain a Trust Token Id in order to complete a change password request. @@ -760,7 +778,7 @@ def deactivate_user_action(self, user_action_id): @deprecated("This method has been renamed to deactivate_users_by_ids, use that method instead.") def deactivate_users(self, user_ids): """ - Deactivates the users with the given ids. + Deactivates the users with the given Ids. Attributes: user_ids: The ids of the users to deactivate. @@ -774,7 +792,7 @@ def deactivate_users(self, user_ids): def deactivate_users_by_ids(self, user_ids): """ - Deactivates the users with the given ids. + Deactivates the users with the given Ids. Attributes: user_ids: The ids of the users to deactivate. @@ -1217,8 +1235,8 @@ def delete_user_with_request(self, user_id, request): @deprecated("This method has been renamed to delete_users_by_query, use that method instead.") def delete_users(self, request): """ - Deletes the users with the given ids, or users matching the provided JSON query or queryString. - The order of preference is ids, query and then queryString, it is recommended to only provide one of the three for the request. + Deletes the users with the given Ids, or users matching the provided JSON query or queryString. + The order of preference is Ids, query and then queryString, it is recommended to only provide one of the three for the request. This method can be used to deactivate or permanently delete (hard-delete) users based upon the hardDelete boolean in the request body. Using the dryRun parameter you may also request the result of the action without actually deleting or deactivating any users. @@ -1233,8 +1251,8 @@ def delete_users(self, request): def delete_users_by_query(self, request): """ - Deletes the users with the given ids, or users matching the provided JSON query or queryString. - The order of preference is ids, query and then queryString, it is recommended to only provide one of the three for the request. + Deletes the users with the given Ids, or users matching the provided JSON query or queryString. + The order of preference is Ids, query and then queryString, it is recommended to only provide one of the three for the request. This method can be used to deactivate or permanently delete (hard-delete) users based upon the hardDelete boolean in the request body. Using the dryRun parameter you may also request the result of the action without actually deleting or deactivating any users. @@ -1756,7 +1774,7 @@ def modify_action(self, action_id, request): action. Attributes: - action_id: The Id of the action to modify. This is technically the user action log id. + action_id: The Id of the action to modify. This is technically the user action log Id. request: The request that contains all the information about the modification. """ return self.start().uri('/api/user/action') \ @@ -1779,16 +1797,16 @@ def passwordless_login(self, request): def patch_api_key(self, key_id, request): """ - Updates an authentication API key by given id + Updates an API key with the given Id. Attributes: - key_id: The Id of the authentication key. If not provided a secure random api key will be generated. - request: The request object that contains all the information needed to create the APIKey. + key_id: The Id of the API key. If not provided a secure random api key will be generated. + request: The request object that contains all the information needed to create the API key. """ return self.start().uri('/api/api-key') \ .url_segment(key_id) \ .body_handler(JSONBodyHandler(request)) \ - .post() \ + .patch() \ .go() def patch_application(self, application_id, request): @@ -2297,7 +2315,7 @@ def reindex(self, request): def remove_user_from_family(self, family_id, user_id): """ - Removes a user from the family with the given id. + Removes a user from the family with the given Id. Attributes: family_id: The Id of the family to remove the user from. @@ -2352,7 +2370,7 @@ def resend_registration_verification(self, email, application_id): def retrieve_api_key(self, key_id): """ - Retrieves an authentication API key for the given id + Retrieves an authentication API key for the given Id. Attributes: key_id: The Id of the API key to retrieve. @@ -2419,7 +2437,7 @@ def retrieve_application(self, application_id=None): Retrieves the application for the given Id or all the applications if the Id is null. Attributes: - application_id: (Optional) The application id. + application_id: (Optional) The application Id. """ return self.start().uri('/api/application') \ .url_segment(application_id) \ @@ -2494,11 +2512,11 @@ def retrieve_consents(self): def retrieve_daily_active_report(self, start, end, application_id=None): """ - Retrieves the daily active user report between the two instants. If you specify an application id, it will only + Retrieves the daily active user report between the two instants. If you specify an application Id, it will only return the daily active counts for that application. Attributes: - application_id: (Optional) The application id. + application_id: (Optional) The application Id. start: The start instant as UTC milliseconds since Epoch. end: The end instant as UTC milliseconds since Epoch. """ @@ -2511,7 +2529,7 @@ def retrieve_daily_active_report(self, start, end, application_id=None): def retrieve_email_template(self, email_template_id=None): """ - Retrieves the email template for the given Id. If you don't specify the id, this will return all the email templates. + Retrieves the email template for the given Id. If you don't specify the Id, this will return all the email templates. Attributes: email_template_id: (Optional) The Id of the email template. @@ -2894,11 +2912,11 @@ def retrieve_lambdas_by_type(self, _type): def retrieve_login_report(self, start, end, application_id=None): """ - Retrieves the login report between the two instants. If you specify an application id, it will only return the + Retrieves the login report between the two instants. If you specify an application Id, it will only return the login counts for that application. Attributes: - application_id: (Optional) The application id. + application_id: (Optional) The application Id. start: The start instant as UTC milliseconds since Epoch. end: The end instant as UTC milliseconds since Epoch. """ @@ -2911,7 +2929,7 @@ def retrieve_login_report(self, start, end, application_id=None): def retrieve_message_template(self, message_template_id=None): """ - Retrieves the message template for the given Id. If you don't specify the id, this will return all the message templates. + Retrieves the message template for the given Id. If you don't specify the Id, this will return all the message templates. Attributes: message_template_id: (Optional) The Id of the message template. @@ -2967,11 +2985,11 @@ def retrieve_messengers(self): def retrieve_monthly_active_report(self, start, end, application_id=None): """ - Retrieves the monthly active user report between the two instants. If you specify an application id, it will only + Retrieves the monthly active user report between the two instants. If you specify an application Id, it will only return the monthly active counts for that application. Attributes: - application_id: (Optional) The application id. + application_id: (Optional) The application Id. start: The start instant as UTC milliseconds since Epoch. end: The end instant as UTC milliseconds since Epoch. """ @@ -3133,7 +3151,7 @@ def retrieve_refresh_tokens(self, user_id): def retrieve_registration(self, user_id, application_id): """ - Retrieves the user registration for the user with the given Id and the given application id. + Retrieves the user registration for the user with the given Id and the given application Id. Attributes: user_id: The Id of the user. @@ -3147,11 +3165,11 @@ def retrieve_registration(self, user_id, application_id): def retrieve_registration_report(self, start, end, application_id=None): """ - Retrieves the registration report between the two instants. If you specify an application id, it will only return + Retrieves the registration report between the two instants. If you specify an application Id, it will only return the registration counts for that application. Attributes: - application_id: (Optional) The application id. + application_id: (Optional) The application Id. start: The start instant as UTC milliseconds since Epoch. end: The end instant as UTC milliseconds since Epoch. """ @@ -3313,7 +3331,7 @@ def retrieve_user(self, user_id): def retrieve_user_action(self, user_action_id=None): """ - Retrieves the user action for the given Id. If you pass in null for the id, this will return all the user + Retrieves the user action for the given Id. If you pass in null for the Id, this will return all the user actions. Attributes: @@ -3326,7 +3344,7 @@ def retrieve_user_action(self, user_action_id=None): def retrieve_user_action_reason(self, user_action_reason_id=None): """ - Retrieves the user action reason for the given Id. If you pass in null for the id, this will return all the user + Retrieves the user action reason for the given Id. If you pass in null for the Id, this will return all the user action reasons. Attributes: @@ -3440,8 +3458,8 @@ def retrieve_user_code(self, client_id, client_secret, user_code): This API is useful if you want to build your own login workflow to complete a device grant. Attributes: - client_id: The client id. - client_secret: The client id. + client_id: The client Id. + client_secret: The client Id. user_code: The end-user verification code. """ body = { @@ -3553,12 +3571,12 @@ def retrieve_user_links_by_user_id(self, user_id, identity_provider_id=None): def retrieve_user_login_report(self, user_id, start, end, application_id=None): """ - 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 + 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 login counts for that application. Attributes: - application_id: (Optional) The application id. - user_id: The userId id. + application_id: (Optional) The application Id. + user_id: The userId Id. start: The start instant as UTC milliseconds since Epoch. end: The end instant as UTC milliseconds since Epoch. """ @@ -3572,12 +3590,12 @@ def retrieve_user_login_report(self, user_id, start, end, application_id=None): def retrieve_user_login_report_by_login_id(self, login_id, start, end, application_id=None): """ - 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 + 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 login counts for that application. Attributes: - application_id: (Optional) The application id. - login_id: The userId id. + application_id: (Optional) The application Id. + login_id: The userId Id. start: The start instant as UTC milliseconds since Epoch. end: The end instant as UTC milliseconds since Epoch. """ @@ -3674,7 +3692,7 @@ def retrieve_web_authn_credentials_for_user(self, user_id): def retrieve_webhook(self, webhook_id=None): """ - Retrieves the webhook for the given Id. If you pass in null for the id, this will return all the webhooks. + Retrieves the webhook for the given Id. If you pass in null for the Id, this will return all the webhooks. Attributes: webhook_id: (Optional) The Id of the webhook. @@ -3906,7 +3924,7 @@ def search_entities(self, request): def search_entities_by_ids(self, ids): """ - Retrieves the entities for the given ids. If any Id is invalid, it is ignored. + Retrieves the entities for the given Ids. If any Id is invalid, it is ignored. Attributes: ids: The entity ids to search for. @@ -4075,7 +4093,7 @@ def search_user_comments(self, request): @deprecated("This method has been renamed to search_users_by_ids, use that method instead.") def search_users(self, ids): """ - Retrieves the users for the given ids. If any Id is invalid, it is ignored. + Retrieves the users for the given Ids. If any Id is invalid, it is ignored. Attributes: ids: The user ids to search for. @@ -4087,10 +4105,10 @@ def search_users(self, ids): def search_users_by_ids(self, ids): """ - Retrieves the users for the given ids. If any Id is invalid, it is ignored. + Retrieves the users for the given Ids. If any Id is invalid, it is ignored. Attributes: - ids: The user ids to search for. + ids: The user Ids to search for. """ return self.start().uri('/api/user/search') \ .url_parameter('ids', self.convert_true_false(ids)) \ @@ -4150,7 +4168,7 @@ def search_webhooks(self, request): def send_email(self, email_template_id, request): """ - Send an email using an email template id. You can optionally provide requestData to access key value + Send an email using an email template Id. You can optionally provide requestData to access key value pairs in the email template. Attributes: @@ -4343,16 +4361,16 @@ def two_factor_login(self, request): .post() \ .go() - def update_api_key(self, api_key_id, request): + def update_api_key(self, key_id, request): """ - Updates an API key by given id + Updates an API key with the given Id. Attributes: - api_key_id: The Id of the API key to update. - request: The request object that contains all the information used to create the API Key. + key_id: The Id of the API key to update. + request: The request that contains all the new API key information. """ return self.start().uri('/api/api-key') \ - .url_segment(api_key_id) \ + .url_segment(key_id) \ .body_handler(JSONBodyHandler(request)) \ .put() \ .go() @@ -4802,7 +4820,7 @@ def validate_device(self, user_code, client_id): Attributes: user_code: The end-user verification code. - client_id: The client id. + client_id: The client Id. """ return self.start_anonymous().uri('/oauth2/device/validate') \ .url_parameter('user_code', self.convert_true_false(user_code)) \