Class GetApiKeyResponse

java.lang.Object
com.algolia.model.search.GetApiKeyResponse

public class GetApiKeyResponse extends Object
GetApiKeyResponse
  • Constructor Details

    • GetApiKeyResponse

      public GetApiKeyResponse()
  • Method Details

    • setValue

      public GetApiKeyResponse setValue(String value)
    • getValue

      @Nullable public String getValue()
      API key.
    • setCreatedAt

      public GetApiKeyResponse setCreatedAt(Long createdAt)
    • getCreatedAt

      @Nonnull public Long getCreatedAt()
      Timestamp of creation in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time).
    • setAcl

      public GetApiKeyResponse setAcl(List<Acl> acl)
    • addAcl

      public GetApiKeyResponse addAcl(Acl aclItem)
    • getAcl

      @Nonnull public List<Acl> getAcl()
      [Permissions](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl) associated with the key.
    • setDescription

      public GetApiKeyResponse setDescription(String description)
    • getDescription

      @Nullable public String getDescription()
      Description of an API key for you and your team members.
    • setIndexes

      public GetApiKeyResponse setIndexes(List<String> indexes)
    • addIndexes

      public GetApiKeyResponse addIndexes(String indexesItem)
    • getIndexes

      @Nullable public List<String> 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

      public GetApiKeyResponse setMaxHitsPerQuery(Integer maxHitsPerQuery)
    • getMaxHitsPerQuery

      @Nullable public Integer 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

      public GetApiKeyResponse setMaxQueriesPerIPPerHour(Integer maxQueriesPerIPPerHour)
    • getMaxQueriesPerIPPerHour

      @Nullable public Integer 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

      public GetApiKeyResponse setQueryParameters(String queryParameters)
    • getQueryParameters

      @Nullable public String 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

      public GetApiKeyResponse setReferers(List<String> referers)
    • addReferers

      public GetApiKeyResponse addReferers(String referersItem)
    • getReferers

      @Nullable public List<String> 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

      public GetApiKeyResponse setValidity(Integer validity)
    • getValidity

      @Nullable public Integer 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

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object