SecuredApiKeyRestrictions class final

Annotations
  • @JsonSerializable()

Constructors

SecuredApiKeyRestrictions.new({SearchParamsObject? searchParams, String? filters, int? validUntil, List<String>? restrictIndices, String? restrictSources, String? userToken})
Returns a new SecuredApiKeyRestrictions instance.
const
SecuredApiKeyRestrictions.fromJson(Map<String, dynamic> json)
factory

Properties

filters String?
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.
final
hashCode int
The hash code for this object.
no setteroverride
restrictIndices List<String>?
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".
final
restrictSources String?
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.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
searchParams SearchParamsObject?
final
userToken String?
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.
final
validUntil int?
Timestamp when the secured API key expires, measured in seconds since the Unix epoch.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override