SecuredAPIKeyRestrictions

algoliasearch.search.SecuredAPIKeyRestrictions
case class SecuredAPIKeyRestrictions(searchParams: Option[SearchParamsObject], filters: Option[String], validUntil: Option[Long], restrictIndices: Option[Seq[String]], restrictSources: Option[String], userToken: Option[String])

SecuredAPIKeyRestrictions

Value parameters

filters

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.

restrictIndices

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".

restrictSources

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.

userToken

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.

validUntil

Timestamp when the secured API key expires, measured in seconds since the Unix epoch.

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product