QlikElixir.REST.Automations (qlik_elixir v0.3.5)
View SourceREST API client for Qlik Cloud Automations.
Provides functions to manage automations (no-code workflows) including creating, running, and monitoring automation executions.
Examples
# List all automations
{:ok, %{"data" => automations}} = Automations.list(config: config)
# Get automation details
{:ok, automation} = Automations.get("auto-123", config: config)
# Enable/disable an automation
{:ok, automation} = Automations.enable("auto-123", config: config)
{:ok, automation} = Automations.disable("auto-123", config: config)
# Trigger a run
{:ok, run} = Automations.run("auto-123", config: config)
# List runs
{:ok, %{"data" => runs}} = Automations.list_runs("auto-123", config: config)
Summary
Functions
Changes the owner of an automation.
Moves an automation to another space.
Copies an automation.
Creates a new automation.
Deletes an automation.
Disables an automation.
Enables an automation.
Gets an automation by ID.
Gets details of a specific run.
Gets automation usage statistics.
Lists all automations.
Lists runs for an automation.
Retries a failed run.
Triggers an automation run.
Stops a running automation.
Updates an automation.
Functions
@spec change_owner(String.t(), String.t(), keyword()) :: {:ok, map()} | {:error, QlikElixir.Error.t()}
Changes the owner of an automation.
Parameters
automation_id- The automation ID.owner_id- The new owner's user ID.
@spec change_space(String.t(), String.t(), keyword()) :: {:ok, map()} | {:error, QlikElixir.Error.t()}
Moves an automation to another space.
Parameters
automation_id- The automation ID.space_id- The target space ID.
@spec copy( String.t(), keyword() ) :: {:ok, map()} | {:error, QlikElixir.Error.t()}
Copies an automation.
@spec create( map(), keyword() ) :: {:ok, map()} | {:error, QlikElixir.Error.t()}
Creates a new automation.
Parameters
params- Map with automation details::name- Required. Automation name.:workspace- Required. Automation workspace definition.
@spec delete( String.t(), keyword() ) :: :ok | {:error, QlikElixir.Error.t()}
Deletes an automation.
@spec disable( String.t(), keyword() ) :: {:ok, map()} | {:error, QlikElixir.Error.t()}
Disables an automation.
@spec enable( String.t(), keyword() ) :: {:ok, map()} | {:error, QlikElixir.Error.t()}
Enables an automation.
@spec get( String.t(), keyword() ) :: {:ok, map()} | {:error, QlikElixir.Error.t()}
Gets an automation by ID.
@spec get_run(String.t(), String.t(), keyword()) :: {:ok, map()} | {:error, QlikElixir.Error.t()}
Gets details of a specific run.
Parameters
automation_id- The automation ID.run_id- The run ID.
@spec get_usage( String.t(), keyword() ) :: {:ok, map()} | {:error, QlikElixir.Error.t()}
Gets automation usage statistics.
Requires TenantAdmin role.
Parameters
filter- Required SCIM-style filter expression. Supports:name: Metric name ("runs", "scheduledRun", "triggeredRun", "webhookRuns", "duration", "bandwidthIn", "bandwidthOut")date: Target date or range
Options
:breakdown_by- When set to "automation", results are segmented by automation.
Examples
# Get total runs for a date range
Automations.get_usage(~s(date ge "2025-01-01" and date le "2025-01-31"))
# Get specific metric
Automations.get_usage(~s(name eq "duration"))
# Get runs by automation
Automations.get_usage(~s(date ge "2025-01-01"), breakdown_by: "automation")
@spec list(keyword()) :: {:ok, map()} | {:error, QlikElixir.Error.t()}
Lists all automations.
Options
:config- Required. The configuration struct.:limit- Maximum number of results per page.:next- Cursor for pagination.:name- Filter by name (partial match).:state- Filter by state ("enabled", "disabled").
@spec list_runs( String.t(), keyword() ) :: {:ok, map()} | {:error, QlikElixir.Error.t()}
Lists runs for an automation.
Options
:limit- Maximum number of results per page.:next- Cursor for pagination.:status- Filter by status.
@spec retry_run(String.t(), String.t(), keyword()) :: {:ok, map()} | {:error, QlikElixir.Error.t()}
Retries a failed run.
Parameters
automation_id- The automation ID.run_id- The run ID to retry.
@spec run( String.t(), keyword() ) :: {:ok, map()} | {:error, QlikElixir.Error.t()}
Triggers an automation run.
Options
:inputs- Map of input parameters for the automation.
@spec stop_run(String.t(), String.t(), keyword()) :: {:ok, map()} | {:error, QlikElixir.Error.t()}
Stops a running automation.
Parameters
automation_id- The automation ID.run_id- The run ID.
@spec update(String.t(), map(), keyword()) :: {:ok, map()} | {:error, QlikElixir.Error.t()}
Updates an automation.
Note: Uses PUT for full replacement of the automation.
Parameters
automation_id- The automation ID.params- Map with automation details.