QlikElixir.REST.Tenants (qlik_elixir v0.3.5)

View Source

REST API client for Qlik Cloud Tenants.

Provides functions to manage tenant configuration and settings.

Examples

# Get current tenant
{:ok, tenant} = Tenants.me(config: config)

# Get tenant by ID
{:ok, tenant} = Tenants.get("tenant-123", config: config)

# Update tenant settings
{:ok, tenant} = Tenants.update("tenant-123", %{name: "New Name"}, config: config)

Summary

Functions

Creates a new tenant.

Deactivates a tenant.

Gets a tenant by ID.

Gets the current tenant (the one the API key belongs to).

Reactivates a deactivated tenant.

Functions

create(params, opts \\ [])

@spec create(
  map(),
  keyword()
) :: {:ok, map()} | {:error, QlikElixir.Error.t()}

Creates a new tenant.

Parameters

  • params - Map with tenant details:
    • :name - Required. Tenant name.
    • :licenseKey - Required. License key.

deactivate(tenant_id, opts \\ [])

@spec deactivate(
  String.t(),
  keyword()
) :: {:ok, map()} | {:error, QlikElixir.Error.t()}

Deactivates a tenant.

get(tenant_id, opts \\ [])

@spec get(
  String.t(),
  keyword()
) :: {:ok, map()} | {:error, QlikElixir.Error.t()}

Gets a tenant by ID.

me(opts \\ [])

@spec me(keyword()) :: {:ok, map()} | {:error, QlikElixir.Error.t()}

Gets the current tenant (the one the API key belongs to).

reactivate(tenant_id, opts \\ [])

@spec reactivate(
  String.t(),
  keyword()
) :: {:ok, map()} | {:error, QlikElixir.Error.t()}

Reactivates a deactivated tenant.

update(tenant_id, params, opts \\ [])

@spec update(String.t(), map(), keyword()) ::
  {:ok, map()} | {:error, QlikElixir.Error.t()}

Updates a tenant.

Parameters

  • tenant_id - The tenant ID.
  • params - Map with fields to update.