diff --git a/src/main/java/io/fusionauth/client/FusionAuthClient.java b/src/main/java/io/fusionauth/client/FusionAuthClient.java index d6c1a6c5c..ade7263f0 100644 --- a/src/main/java/io/fusionauth/client/FusionAuthClient.java +++ b/src/main/java/io/fusionauth/client/FusionAuthClient.java @@ -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. @@ -1133,7 +1133,7 @@ public ClientResponse deactivateUserAction(UUID userActionId) { } /** - * Deactivates the users with the given ids. + * Deactivates the users with the given Ids. * * @param userIds The ids of the users to deactivate. * @return The ClientResponse object. @@ -1151,7 +1151,7 @@ public ClientResponse deactivateUsers(Collection deleteUserWithRequest(UUID userId, UserDelet } /** - * 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. @@ -1679,8 +1679,8 @@ public ClientResponse deleteUsers(UserDeleteRequest } /** - * 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. @@ -2259,7 +2259,7 @@ public ClientResponse lookupIdentityProvider(String domain * Modifies a temporal user action by changing the expiration of the action and optionally adding a comment to the * action. * - * @param actionId The Id of the action to modify. This is technically the user action log id. + * @param actionId The Id of the action to modify. This is technically the user action log Id. * @param request The request that contains all the information about the modification. * @return The ClientResponse object. */ @@ -2287,18 +2287,18 @@ public ClientResponse passwordlessLogin(PasswordlessLogin } /** - * Updates an authentication API key by given id + * Updates an API key with the given Id. * - * @param keyId The Id of the authentication key. If not provided a secure random api key will be generated. - * @param request The request object that contains all the information needed to create the APIKey. + * @param keyId The Id of the API key. If not provided a secure random api key will be generated. + * @param request The request object that contains all the information needed to create the API key. * @return The ClientResponse object. */ - public ClientResponse patchAPIKey(UUID keyId, APIKeyRequest request) { + public ClientResponse patchAPIKey(UUID keyId, Map request) { return start(APIKeyResponse.class, Errors.class) .uri("/api/api-key") .urlSegment(keyId) .bodyHandler(new JSONBodyHandler(request, objectMapper())) - .post() + .patch() .go(); } @@ -2879,7 +2879,7 @@ public ClientResponse reindex(ReindexRequest request) { } /** - * Removes a user from the family with the given id. + * Removes a user from the family with the given Id. * * @param familyId The Id of the family to remove the user from. * @param userId The Id of the user to remove from the family. @@ -2942,7 +2942,7 @@ public ClientResponse resendRegistrationVeri } /** - * Retrieves an authentication API key for the given id + * Retrieves an authentication API key for the given Id. * * @param keyId The Id of the API key to retrieve. * @return The ClientResponse object. @@ -3018,7 +3018,7 @@ public ClientResponse retrieveActiveActions(UUID userId) /** * Retrieves the application for the given Id or all the applications if the Id is null. * - * @param applicationId (Optional) The application id. + * @param applicationId (Optional) The application Id. * @return The ClientResponse object. */ public ClientResponse retrieveApplication(UUID applicationId) { @@ -3108,10 +3108,10 @@ public ClientResponse retrieveConsents() { } /** - * 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. * - * @param applicationId (Optional) The application id. + * @param applicationId (Optional) The application Id. * @param start The start instant as UTC milliseconds since Epoch. * @param end The end instant as UTC milliseconds since Epoch. * @return The ClientResponse object. @@ -3127,7 +3127,7 @@ public ClientResponse retrieveDailyActive } /** - * 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. * * @param emailTemplateId (Optional) The Id of the email template. * @return The ClientResponse object. @@ -3576,10 +3576,10 @@ public ClientResponse retrieveLambdasByType(LambdaType typ } /** - * 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. * - * @param applicationId (Optional) The application id. + * @param applicationId (Optional) The application Id. * @param start The start instant as UTC milliseconds since Epoch. * @param end The end instant as UTC milliseconds since Epoch. * @return The ClientResponse object. @@ -3595,7 +3595,7 @@ public ClientResponse retrieveLoginReport(UUID appl } /** - * 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. * * @param messageTemplateId (Optional) The Id of the message template. * @return The ClientResponse object. @@ -3661,10 +3661,10 @@ public ClientResponse retrieveMessengers() { } /** - * 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. * - * @param applicationId (Optional) The application id. + * @param applicationId (Optional) The application Id. * @param start The start instant as UTC milliseconds since Epoch. * @param end The end instant as UTC milliseconds since Epoch. * @return The ClientResponse object. @@ -3853,7 +3853,7 @@ public ClientResponse retrieveRefreshTokens(UUID u } /** - * 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. * * @param userId The Id of the user. * @param applicationId The Id of the application. @@ -3869,10 +3869,10 @@ public ClientResponse retrieveRegistration(UUID us } /** - * 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. * - * @param applicationId (Optional) The application id. + * @param applicationId (Optional) The application Id. * @param start The start instant as UTC milliseconds since Epoch. * @param end The end instant as UTC milliseconds since Epoch. * @return The ClientResponse object. @@ -4063,7 +4063,7 @@ public ClientResponse retrieveUser(UUID userId) { } /** - * 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. * * @param userActionId (Optional) The Id of the user action. @@ -4078,7 +4078,7 @@ public ClientResponse retrieveUserAction(UUID userActi } /** - * 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. * * @param userActionReasonId (Optional) The Id of the user action reason. @@ -4193,8 +4193,8 @@ public ClientResponse retrieveUserByVerificationId(String *

* This API is useful if you want to build your own login workflow to complete a device grant. * - * @param client_id The client id. - * @param client_secret The client id. + * @param client_id The client Id. + * @param client_secret The client Id. * @param user_code The end-user verification code. * @return The ClientResponse object. */ @@ -4321,11 +4321,11 @@ public ClientResponse retrieveUserLinksByU } /** - * 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. * - * @param applicationId (Optional) The application id. - * @param userId The userId id. + * @param applicationId (Optional) The application Id. + * @param userId The userId Id. * @param start The start instant as UTC milliseconds since Epoch. * @param end The end instant as UTC milliseconds since Epoch. * @return The ClientResponse object. @@ -4342,11 +4342,11 @@ public ClientResponse retrieveUserLoginReport(UUID } /** - * 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. * - * @param applicationId (Optional) The application id. - * @param loginId The userId id. + * @param applicationId (Optional) The application Id. + * @param loginId The userId Id. * @param start The start instant as UTC milliseconds since Epoch. * @param end The end instant as UTC milliseconds since Epoch. * @return The ClientResponse object. @@ -4435,7 +4435,7 @@ public ClientResponse retrieveWebAuthnCreden } /** - * 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. * * @param webhookId (Optional) The Id of the webhook. * @return The ClientResponse object. @@ -4701,7 +4701,7 @@ public ClientResponse searchEntities(EntitySearchR } /** - * 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. * * @param ids The entity ids to search for. * @return The ClientResponse object. @@ -4897,7 +4897,7 @@ public ClientResponse searchUserComments(User } /** - * 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. * * @param ids The user ids to search for. * @return The ClientResponse object. @@ -4913,9 +4913,9 @@ public ClientResponse searchUsers(Collection 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. * - * @param ids The user ids to search for. + * @param ids The user Ids to search for. * @return The ClientResponse object. */ public ClientResponse searchUsersByIds(Collection ids) { @@ -4987,7 +4987,7 @@ public ClientResponse searchWebhooks(WebhookSearc } /** - * 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. * * @param emailTemplateId The Id for the template. @@ -5185,16 +5185,16 @@ public ClientResponse twoFactorLogin(TwoFactorLoginReques } /** - * Updates an API key by given id + * Updates an API key with the given Id. * - * @param apiKeyId The Id of the API key to update. - * @param request The request object that contains all the information used to create the API Key. + * @param keyId The Id of the API key to update. + * @param request The request that contains all the new API key information. * @return The ClientResponse object. */ - public ClientResponse updateAPIKey(UUID apiKeyId, APIKeyRequest request) { + public ClientResponse updateAPIKey(UUID keyId, APIKeyRequest request) { return start(APIKeyResponse.class, Errors.class) .uri("/api/api-key") - .urlSegment(apiKeyId) + .urlSegment(keyId) .bodyHandler(new JSONBodyHandler(request, objectMapper())) .put() .go(); @@ -5705,7 +5705,7 @@ public ClientResponse upsertEntityGrant(UUID entityId, EntityGrant * If you build your own activation form you should validate the user provided code prior to beginning the Authorization grant. * * @param user_code The end-user verification code. - * @param client_id The client id. + * @param client_id The client Id. * @return The ClientResponse object. */ public ClientResponse validateDevice(String user_code, String client_id) {