Package com.algolia.search
Interface SearchClientAPIKeys
-
- All Superinterfaces:
SearchClientBase
- All Known Implementing Classes:
SearchClient
public interface SearchClientAPIKeys extends SearchClientBase
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default AddApiKeyResponseaddApiKey(ApiKey acl)Add a new API Key with specific permissions/restrictionsdefault AddApiKeyResponseaddApiKey(ApiKey acl, RequestOptions requestOptions)Add a new API Key with specific permissions/restrictionsdefault CompletableFuture<AddApiKeyResponse>addApiKeyAsync(ApiKey acl)Add a new API Key with specific permissions/restrictionsdefault CompletableFuture<AddApiKeyResponse>addApiKeyAsync(ApiKey acl, RequestOptions requestOptions)Add a new API Key with specific permissions/restrictionsdefault DeleteApiKeyResponsedeleteApiKey(String apiKey)Delete an existing API Keydefault DeleteApiKeyResponsedeleteApiKey(String apiKey, RequestOptions requestOptions)Delete an existing API Keydefault CompletableFuture<DeleteApiKeyResponse>deleteApiKeyAsync(String apiKey)Delete an existing API Keydefault CompletableFuture<DeleteApiKeyResponse>deleteApiKeyAsync(String apiKey, RequestOptions requestOptions)Delete an existing API Keydefault StringgenerateSecuredAPIKey(String parentAPIKey, SecuredApiKeyRestriction restriction)Generate a virtual API Key without any call to the server.default ApiKeygetApiKey(String apiKey)Get the permissions of an API Key.default ApiKeygetApiKey(String apiKey, RequestOptions requestOptions)Get the permissions of an API Key.default CompletableFuture<ApiKey>getApiKeyAsync(String apiKey)Get the permissions of an API Key.default CompletableFuture<ApiKey>getApiKeyAsync(String apiKey, RequestOptions requestOptions)Get the permissions of an API Key.default DurationgetSecuredApiKeyRemainingValidity(String securedAPIKey)Gets how many seconds are left before the secured API key expires.default List<ApiKey>listApiKeys()List all existing user keys with their associated ACLsdefault List<ApiKey>listApiKeys(RequestOptions requestOptions)List all existing user keys with their associated ACLsdefault CompletableFuture<List<ApiKey>>listApiKeysAsync()List asynchronously all existing user keys with their associated ACLsdefault CompletableFuture<List<ApiKey>>listApiKeysAsync(RequestOptions requestOptions)List asynchronously all existing user keys with their associated ACLsdefault RestoreApiKeyResponserestoreApiKey(String apiKey)Restore the given API Keydefault RestoreApiKeyResponserestoreApiKey(String apiKey, RequestOptions requestOptions)Restore the given API Keydefault CompletableFuture<RestoreApiKeyResponse>restoreApiKeyAsync(String apiKey)Restore the given API Keydefault CompletableFuture<RestoreApiKeyResponse>restoreApiKeyAsync(String apiKey, RequestOptions requestOptions)Restore the given API Keydefault UpdateApiKeyResponseupdateApiKey(ApiKey request)Update the permissions of an existing API Key.default UpdateApiKeyResponseupdateApiKey(ApiKey request, RequestOptions requestOptions)Update the permissions of an existing API Key.default CompletableFuture<UpdateApiKeyResponse>updateApiKeyAsync(ApiKey request)Update the permissions of an existing API Key.default CompletableFuture<UpdateApiKeyResponse>updateApiKeyAsync(ApiKey request, RequestOptions requestOptions)Update the permissions of an existing API Key.-
Methods inherited from interface com.algolia.search.SearchClientBase
getConfig, getTransport, waitAppTask, waitAppTask, waitTask, waitTask
-
-
-
-
Method Detail
-
listApiKeys
default List<ApiKey> listApiKeys()
List all existing user keys with their associated ACLs- Throws:
AlgoliaRetryException- When the retry has failed on all hostsAlgoliaApiException- When the API sends an http error codeAlgoliaRuntimeException- When an error occurred during the serialization
-
listApiKeys
default List<ApiKey> listApiKeys(RequestOptions requestOptions)
List all existing user keys with their associated ACLs- Parameters:
requestOptions- Options to pass to this request- Throws:
AlgoliaRetryException- When the retry has failed on all hostsAlgoliaApiException- When the API sends an http error codeAlgoliaRuntimeException- When an error occurred during the serialization
-
listApiKeysAsync
default CompletableFuture<List<ApiKey>> listApiKeysAsync()
List asynchronously all existing user keys with their associated ACLs- Throws:
AlgoliaRetryException- When the retry has failed on all hostsAlgoliaApiException- When the API sends an http error codeAlgoliaRuntimeException- When an error occurred during the serialization
-
listApiKeysAsync
default CompletableFuture<List<ApiKey>> listApiKeysAsync(RequestOptions requestOptions)
List asynchronously all existing user keys with their associated ACLs- Parameters:
requestOptions- Options to pass to this request- Throws:
AlgoliaRetryException- When the retry has failed on all hostsAlgoliaApiException- When the API sends an http error codeAlgoliaRuntimeException- When an error occurred during the serialization
-
getApiKey
default ApiKey getApiKey(@Nonnull String apiKey)
Get the permissions of an API Key.- Parameters:
apiKey- The API key to retrieve- Throws:
AlgoliaRetryException- When the retry has failed on all hostsAlgoliaApiException- When the API sends an http error codeAlgoliaRuntimeException- When an error occurred during the serialization
-
getApiKey
default ApiKey getApiKey(@Nonnull String apiKey, RequestOptions requestOptions)
Get the permissions of an API Key.- Parameters:
apiKey- The API key to retrieverequestOptions- Options to pass to this request- Throws:
AlgoliaRetryException- When the retry has failed on all hostsAlgoliaApiException- When the API sends an http error codeAlgoliaRuntimeException- When an error occurred during the serialization
-
getApiKeyAsync
default CompletableFuture<ApiKey> getApiKeyAsync(@Nonnull String apiKey)
Get the permissions of an API Key.- Parameters:
apiKey- The API key to retrieve- Throws:
AlgoliaRetryException- When the retry has failed on all hostsAlgoliaApiException- When the API sends an http error codeAlgoliaRuntimeException- When an error occurred during the serialization
-
getApiKeyAsync
default CompletableFuture<ApiKey> getApiKeyAsync(@Nonnull String apiKey, RequestOptions requestOptions)
Get the permissions of an API Key.- Parameters:
apiKey- The API key to retrieverequestOptions- Options to pass to this request- Throws:
AlgoliaRetryException- When the retry has failed on all hostsAlgoliaApiException- When the API sends an http error codeAlgoliaRuntimeException- When an error occurred during the serialization
-
addApiKey
default AddApiKeyResponse addApiKey(@Nonnull ApiKey acl)
Add a new API Key with specific permissions/restrictions- Parameters:
acl- The api with the restrictions/permissions to add- Throws:
AlgoliaRetryException- When the retry has failed on all hostsAlgoliaApiException- When the API sends an http error codeAlgoliaRuntimeException- When an error occurred during the serialization
-
addApiKey
default AddApiKeyResponse addApiKey(@Nonnull ApiKey acl, RequestOptions requestOptions)
Add a new API Key with specific permissions/restrictions- Parameters:
acl- The api with the restrictions/permissions to addrequestOptions- Options to pass to this request- Throws:
AlgoliaRetryException- When the retry has failed on all hostsAlgoliaApiException- When the API sends an http error codeAlgoliaRuntimeException- When an error occurred during the serialization
-
addApiKeyAsync
default CompletableFuture<AddApiKeyResponse> addApiKeyAsync(@Nonnull ApiKey acl)
Add a new API Key with specific permissions/restrictions- Parameters:
acl- The api with the restrictions/permissions to add- Throws:
AlgoliaRetryException- When the retry has failed on all hostsAlgoliaApiException- When the API sends an http error codeAlgoliaRuntimeException- When an error occurred during the serialization
-
addApiKeyAsync
default CompletableFuture<AddApiKeyResponse> addApiKeyAsync(@Nonnull ApiKey acl, RequestOptions requestOptions)
Add a new API Key with specific permissions/restrictions- Parameters:
acl- The api with the restrictions/permissions to addrequestOptions- Options to pass to this request- Throws:
AlgoliaRetryException- When the retry has failed on all hostsAlgoliaApiException- When the API sends an http error codeAlgoliaRuntimeException- When an error occurred during the serialization
-
deleteApiKey
default DeleteApiKeyResponse deleteApiKey(@Nonnull String apiKey)
Delete an existing API Key- Parameters:
apiKey- The API Key to delete- Throws:
AlgoliaRetryException- When the retry has failed on all hostsAlgoliaApiException- When the API sends an http error codeAlgoliaRuntimeException- When an error occurred during the serialization
-
deleteApiKey
default DeleteApiKeyResponse deleteApiKey(@Nonnull String apiKey, RequestOptions requestOptions)
Delete an existing API Key- Parameters:
apiKey- The API Key to deleterequestOptions- Options to pass to this request- Throws:
AlgoliaRetryException- When the retry has failed on all hostsAlgoliaApiException- When the API sends an http error codeAlgoliaRuntimeException- When an error occurred during the serialization
-
deleteApiKeyAsync
default CompletableFuture<DeleteApiKeyResponse> deleteApiKeyAsync(@Nonnull String apiKey)
Delete an existing API Key- Parameters:
apiKey- The API Key to delete- Throws:
AlgoliaRetryException- When the retry has failed on all hostsAlgoliaApiException- When the API sends an http error codeAlgoliaRuntimeException- When an error occurred during the serialization
-
deleteApiKeyAsync
default CompletableFuture<DeleteApiKeyResponse> deleteApiKeyAsync(@Nonnull String apiKey, RequestOptions requestOptions)
Delete an existing API Key- Parameters:
apiKey- The API Key to deleterequestOptions- Options to pass to this request- Throws:
AlgoliaRetryException- When the retry has failed on all hostsAlgoliaApiException- When the API sends an http error codeAlgoliaRuntimeException- When an error occurred during the serialization
-
updateApiKey
default UpdateApiKeyResponse updateApiKey(@Nonnull ApiKey request)
Update the permissions of an existing API Key.- Parameters:
request- The API key to update- Throws:
AlgoliaRetryException- When the retry has failed on all hostsAlgoliaApiException- When the API sends an http error codeAlgoliaRuntimeException- When an error occurred during the serialization
-
updateApiKey
default UpdateApiKeyResponse updateApiKey(@Nonnull ApiKey request, RequestOptions requestOptions)
Update the permissions of an existing API Key.- Parameters:
request- The API key to updaterequestOptions- Options to pass to this request- Throws:
AlgoliaRetryException- When the retry has failed on all hostsAlgoliaApiException- When the API sends an http error codeAlgoliaRuntimeException- When an error occurred during the serialization
-
updateApiKeyAsync
default CompletableFuture<UpdateApiKeyResponse> updateApiKeyAsync(@Nonnull ApiKey request)
Update the permissions of an existing API Key.- Parameters:
request- The API key to update- Throws:
AlgoliaRetryException- When the retry has failed on all hostsAlgoliaApiException- When the API sends an http error codeAlgoliaRuntimeException- When an error occurred during the serialization
-
updateApiKeyAsync
default CompletableFuture<UpdateApiKeyResponse> updateApiKeyAsync(@Nonnull ApiKey request, RequestOptions requestOptions)
Update the permissions of an existing API Key.- Parameters:
request- The API key to updaterequestOptions- Options to pass to this request- Throws:
AlgoliaRetryException- When the retry has failed on all hostsAlgoliaApiException- When the API sends an http error codeAlgoliaRuntimeException- When an error occurred during the serialization
-
restoreApiKey
default RestoreApiKeyResponse restoreApiKey(@Nonnull String apiKey)
Restore the given API Key- Parameters:
apiKey- The given API Key- Throws:
AlgoliaRetryException- When the retry has failed on all hostsAlgoliaApiException- When the API sends an http error codeAlgoliaRuntimeException- When an error occurred during the serialization or deserialization
-
restoreApiKey
default RestoreApiKeyResponse restoreApiKey(@Nonnull String apiKey, RequestOptions requestOptions)
Restore the given API Key- Parameters:
apiKey- The given API KeyrequestOptions- Options to pass to this request- Throws:
AlgoliaRetryException- When the retry has failed on all hostsAlgoliaApiException- When the API sends an http error codeAlgoliaRuntimeException- When an error occurred during the serialization
-
restoreApiKeyAsync
default CompletableFuture<RestoreApiKeyResponse> restoreApiKeyAsync(@Nonnull String apiKey)
Restore the given API Key- Parameters:
apiKey- The given API Key- Throws:
AlgoliaRetryException- When the retry has failed on all hostsAlgoliaApiException- When the API sends an http error codeAlgoliaRuntimeException- When an error occurred during the serialization or deserialization
-
restoreApiKeyAsync
default CompletableFuture<RestoreApiKeyResponse> restoreApiKeyAsync(@Nonnull String apiKey, RequestOptions requestOptions)
Restore the given API Key- Parameters:
apiKey- The given API KeyrequestOptions- Options to pass to this request- Throws:
AlgoliaRetryException- When the retry has failed on all hostsAlgoliaApiException- When the API sends an http error codeAlgoliaRuntimeException- When an error occurred during the serialization
-
generateSecuredAPIKey
default String generateSecuredAPIKey(@Nonnull String parentAPIKey, SecuredApiKeyRestriction restriction) throws Exception
Generate a virtual API Key without any call to the server.- Parameters:
parentAPIKey- API key to generate from.restriction- Restriction to add the key- Throws:
Exception- if an error occurs during the encodingAlgoliaRetryException- When the retry has failed on all hostsAlgoliaApiException- When the API sends an http error codeAlgoliaRuntimeException- When an error occurred during the serialization
-
getSecuredApiKeyRemainingValidity
default Duration getSecuredApiKeyRemainingValidity(@Nonnull String securedAPIKey)
Gets how many seconds are left before the secured API key expires.- Parameters:
securedAPIKey- The secured API Key to check- Throws:
AlgoliaRuntimeException- ifsecuredAPIKeyis null, empty or whitespaces.AlgoliaRuntimeException- ifsecuredAPIKeydoesn't have avalidUntilparameter.
-
-