Package com.algolia.model.search
Class SecuredApiKeyRestrictions
java.lang.Object
com.algolia.model.search.SecuredApiKeyRestrictions
SecuredApiKeyRestrictions
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddRestrictIndices(String restrictIndicesItem) booleanFilters that apply to every search made with the secured API key.Index names or patterns that this API key can access.IP network that are allowed to use this key.Get searchParamsPseudonymous user identifier to restrict usage of this API key to specific users.Timestamp when the secured API key expires, measured in seconds since the Unix epoch.inthashCode()setFilters(String filters) setRestrictIndices(List<String> restrictIndices) setRestrictSources(String restrictSources) setSearchParams(SearchParamsObject searchParams) setUserToken(String userToken) setValidUntil(Long validUntil) toString()
-
Constructor Details
-
SecuredApiKeyRestrictions
public SecuredApiKeyRestrictions()
-
-
Method Details
-
setSearchParams
-
getSearchParams
Get searchParams -
setFilters
-
getFilters
Filters that apply to every search made with the secured API key. Extra filters added at search time will be combined with `AND`. For example, if you set `group:admin` as fixed filter on your generated API key, and add `groups:visitors` to the search query, the complete set of filters will be `group:admin AND groups:visitors`. -
setValidUntil
-
getValidUntil
Timestamp when the secured API key expires, measured in seconds since the Unix epoch. -
setRestrictIndices
-
addRestrictIndices
-
getRestrictIndices
Index names or patterns that this API key can access. By default, an API key can access all indices in the same application. You can use leading and trailing wildcard characters (`*`): - `dev_*` matches all indices starting with \"dev_\". - `*_dev` matches all indices ending with \"_dev\". - `*_products_*` matches all indices containing \"_products_\". -
setRestrictSources
-
getRestrictSources
IP network that are allowed to use this key. You can only add a single source, but you can provide a range of IP addresses. Use this to protect against API key leaking and reuse. -
setUserToken
-
getUserToken
Pseudonymous user identifier to restrict usage of this API key to specific users. By default, rate limits are set based on IP addresses. This can be an issue if many users search from the same IP address. To avoid this, add a user token to each generated API key. -
equals
-
hashCode
public int hashCode() -
toString
-