QlikElixir.REST.Reports (qlik_elixir v0.3.5)

View Source

REST API client for Qlik Cloud Reports.

Reports allow generating and managing report outputs from Qlik apps, including Excel templates and PDF exports.

Examples

# List all reports
{:ok, %{"data" => reports}} = Reports.list(config: config)

# Filter by status
{:ok, %{"data" => completed}} = Reports.list(config: config, status: "completed")

# Create a report
{:ok, report} = Reports.create(%{appId: "app-123", type: "sense-excel-template"}, config: config)

# Download a completed report
{:ok, %{"url" => url}} = Reports.download("report-123", config: config)

Summary

Functions

Creates a new report.

Deletes a report.

Gets the download URL for a completed report.

Gets a report by ID.

Gets the status of a report generation.

Lists all reports.

Functions

create(params, opts \\ [])

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

Creates a new report.

Parameters

  • params - Map with report details:
    • :appId - Required. The app ID to generate report from.
    • :type - Report type (e.g., "sense-excel-template").
    • :output - Output configuration map.

delete(report_id, opts \\ [])

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

Deletes a report.

download(report_id, opts \\ [])

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

Gets the download URL for a completed report.

Returns a temporary URL that can be used to download the report file.

get(report_id, opts \\ [])

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

Gets a report by ID.

get_status(report_id, opts \\ [])

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

Gets the status of a report generation.

Returns progress information for reports still being processed.

list(opts \\ [])

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

Lists all reports.

Options

  • :config - Required. The configuration struct.
  • :limit - Maximum number of results per page.
  • :next - Cursor for pagination.
  • :app_id - Filter by app ID.
  • :status - Filter by status ("queued", "processing", "completed", "failed").