View Source OpenApiTypesense.Keys (OpenApiTypesense v0.2.0)

Provides API endpoints related to keys

Summary

Functions

create_key(body, opts \\ [])

Create an API Key

Create an API Key with fine-grain access control. You can restrict access on both a per-collection and per-action level. The generated key is returned only during creation. You want to store this key carefully in a secure place.

create_key(conn, body, opts)

delete_key(keyId, opts \\ [])

@spec delete_key(
  integer(),
  keyword()
) ::
  {:ok, OpenApiTypesense.ApiKeyDeleteResponse.t()}
  | {:error, OpenApiTypesense.ApiResponse.t()}

Delete an API key given its ID.

delete_key(conn, keyId, opts)

get_key(keyId, opts \\ [])

@spec get_key(
  integer(),
  keyword()
) ::
  {:ok, OpenApiTypesense.ApiKey.t()}
  | {:error, OpenApiTypesense.ApiResponse.t()}

Retrieve (metadata about) a key

Retrieve (metadata about) a key. Only the key prefix is returned when you retrieve a key. Due to security reasons, only the create endpoint returns the full API key.

get_key(conn, keyId, opts)

get_keys(opts \\ [])

@spec get_keys(keyword()) :: {:ok, OpenApiTypesense.ApiKeysResponse.t()} | :error

Retrieve (metadata about) all keys.

get_keys(conn, opts)

@spec get_keys(
  OpenApiTypesense.Connection.t(),
  keyword()
) :: {:ok, OpenApiTypesense.ApiKeysResponse.t()} | :error