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

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

      public GetApiKeyResponse setCreatedAt(Long createdAt)
    • getCreatedAt

      @Nonnull public Long getCreatedAt()
      Timestamp when the object was created, in milliseconds since the Unix epoch.
    • setAcl

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

      public GetApiKeyResponse addAcl(Acl aclItem)
    • getAcl

      @Nonnull public List<Acl> getAcl()
      Permissions that determine the type of API requests this key can make. The required ACL is listed in each endpoint's reference. For more information, see [access control list](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl).
    • setDescription

      public GetApiKeyResponse setDescription(String description)
    • getDescription

      @Nullable public String getDescription()
      Description of an API key to help you identify this API key.
    • setIndexes

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

      public GetApiKeyResponse addIndexes(String indexesItem)
    • getIndexes

      @Nullable public List<String> getIndexes()
      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_\".
    • setMaxHitsPerQuery

      public GetApiKeyResponse setMaxHitsPerQuery(Integer maxHitsPerQuery)
    • getMaxHitsPerQuery

      @Nullable public Integer getMaxHitsPerQuery()
      Maximum number of results this API key can retrieve in one query. By default, there's no limit.
    • setMaxQueriesPerIPPerHour

      public GetApiKeyResponse setMaxQueriesPerIPPerHour(Integer maxQueriesPerIPPerHour)
    • getMaxQueriesPerIPPerHour

      @Nullable public Integer getMaxQueriesPerIPPerHour()
      Maximum number of API requests allowed per IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) per hour. If this limit is reached, the API returns an error with status code `429`. By default, there's no limit.
    • setQueryParameters

      public GetApiKeyResponse setQueryParameters(String queryParameters)
    • getQueryParameters

      @Nullable public String getQueryParameters()
      Query parameters to add when making API requests with this API key. To restrict this API key to specific IP addresses, add the `restrictSources` parameter. You can only add a single source, but you can provide a range of IP addresses. Creating an API key fails if the request is made from an IP address outside the restricted range.
    • setReferers

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

      public GetApiKeyResponse addReferers(String referersItem)
    • getReferers

      @Nullable public List<String> getReferers()
      Allowed HTTP referrers for this API key. By default, all referrers are allowed. You can use leading and trailing wildcard characters (`*`): - `https://algolia.com/_*` allows all referrers starting with \"https://algolia.com/\" - `*.algolia.com` allows all referrers ending with \".algolia.com\" - `*algolia.com*` allows all referrers in the domain \"algolia.com\". Like all HTTP headers, referrers can be spoofed. Don't rely on them to secure your data. For more information, see [HTTP referrer restrictions](https://www.algolia.com/doc/guides/security/security-best-practices/#http-referrers-restrictions).
    • setValidity

      public GetApiKeyResponse setValidity(Integer validity)
    • getValidity

      @Nullable public Integer getValidity()
      Duration (in seconds) after which the API key expires. By default, API keys don't expire.
    • 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