Package com.algolia.model.search
Class GetApiKeyResponse
java.lang.Object
com.algolia.model.search.GetApiKeyResponse
GetApiKeyResponse
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddIndexes(String indexesItem) addReferers(String referersItem) booleangetAcl()[Permissions](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl) associated with the key.Timestamp of creation in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time).Description of an API key for you and your team members.Restricts this API key to a list of indices or index patterns.Maximum number of hits this API key can retrieve in one query.Maximum number of API calls per hour allowed from a given IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).Force some [query parameters](https://www.algolia.com/doc/api-reference/api-parameters/) to be applied for each query made with this API key.Restrict this API key to specific [referrers](https://www.algolia.com/doc/guides/security/api-keys/in-depth/api-key-restrictions/#http-referrers).Validity duration of a key (in seconds).getValue()API key.inthashCode()setCreatedAt(Long createdAt) setDescription(String description) setIndexes(List<String> indexes) setMaxHitsPerQuery(Integer maxHitsPerQuery) setMaxQueriesPerIPPerHour(Integer maxQueriesPerIPPerHour) setQueryParameters(String queryParameters) setReferers(List<String> referers) setValidity(Integer validity) toString()
-
Constructor Details
-
GetApiKeyResponse
public GetApiKeyResponse()
-
-
Method Details
-
setValue
-
getValue
API key. -
setCreatedAt
-
getCreatedAt
Timestamp of creation in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). -
setAcl
-
addAcl
-
getAcl
[Permissions](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl) associated with the key. -
setDescription
-
getDescription
Description of an API key for you and your team members. -
setIndexes
-
addIndexes
-
getIndexes
Restricts this API key to a list of indices or index patterns. If the list is empty, all indices are allowed. Specify either an exact index name or a pattern with a leading or trailing wildcard character (or both). For example: - `dev_*` matches all indices starting with \"dev_\" - `*_dev` matches all indices ending with \"_dev\" - `*_products_*` matches all indices containing \"_products_\". -
setMaxHitsPerQuery
-
getMaxHitsPerQuery
Maximum number of hits this API key can retrieve in one query. If zero, no limit is enforced. > **Note**: Use this parameter to protect you from third-party attempts to retrieve your entire content by massively querying the index. -
setMaxQueriesPerIPPerHour
-
getMaxQueriesPerIPPerHour
Maximum number of API calls per hour allowed from a given IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/). Each time an API call is performed with this key, a check is performed. If there were more than the specified number of calls within the last hour, the API returns an error with the status code `429` (Too Many Requests). > **Note**: Use this parameter to protect you from third-party attempts to retrieve your entire content by massively querying the index. -
setQueryParameters
-
getQueryParameters
Force some [query parameters](https://www.algolia.com/doc/api-reference/api-parameters/) to be applied for each query made with this API key. It's a URL-encoded query string. -
setReferers
-
addReferers
-
getReferers
Restrict this API key to specific [referrers](https://www.algolia.com/doc/guides/security/api-keys/in-depth/api-key-restrictions/#http-referrers). If empty, all referrers are allowed. For example: - `https://algolia.com/_*` matches all referrers starting with \"https://algolia.com/\" - `*.algolia.com` matches all referrers ending with \".algolia.com\" - `*algolia.com*` allows everything in the domain \"algolia.com\". -
setValidity
-
getValidity
Validity duration of a key (in seconds). The key will automatically be removed after this time has expired. The default value of 0 never expires. Short-lived API keys are useful to grant temporary access to your data. For example, in mobile apps, you can't [control when users update your app](https://www.algolia.com/doc/guides/security/security-best-practices/#use-secured-api-keys-in-mobile-apps). So instead of encoding keys into your app as you would for a web app, you should dynamically fetch them from your mobile app's backend. -
equals
-
hashCode
public int hashCode() -
toString
-