QRS API Client

class qrs_api_client.client.QRSClient(server_name: str, server_port: int, auth_method: str, auth_manager: AuthManager = None, verify_ssl=True)[source]

Bases: object

Client for interacting with the Qlik Repository Service (QRS) API.

Provides methods for establishing a session and performing CRUD operations on QRS entities.

app_upload(app_name: str, file_name: str)[source]

Executes a POST request to the QRS API.

Parameters:
  • app_name (str) – The name of the app after upload.

  • file_name (str) – The path to the file.

Returns:

JSON response as a dictionary.

Return type:

dict

app_upload_replace(target_app_id: UUID, file_name: str)[source]

Executes a POST request to the QRS API.

Parameters:
  • target_app_id (UUID) – The ID of the app to be replaced.

  • file_name (str) – The path to the file.

Returns:

JSON response as a dictionary.

Return type:

dict

delete(endpoint: str, params: str = None) dict[source]

Executes a DELETE request to the QRS API.

Parameters:
  • endpoint (str) – The API endpoint to call.

  • params (str, optional) – Query parameters to include in the request.

Returns:

JSON response as a dictionary or None if an error occurs.

Return type:

dict

get(endpoint: str, params: str = None, headers: dict = None) dict[source]

Executes a GET request to the QRS API.

Parameters:
  • endpoint (str) – The API endpoint to call.

  • params (str, optional) – Query parameters to include in the request.

  • headers (dict, optional) – Additional header parameters.

Returns:

JSON response as a dictionary or None if an error occurs.

Return type:

dict

post(endpoint: str, params: str = None, headers: dict = None, data=None) dict[source]

Executes a POST request to the QRS API.

Parameters:
  • endpoint (str) – The API endpoint to call.

  • params (str, optional) – Query parameters to include in the request.

  • headers (dict, optional) – Additional header parameters.

  • data (dict or str, optional) – The JSON payload to include in the request body.

Returns:

JSON response as a dictionary or None if an error occurs.

Return type:

dict

put(endpoint: str, params: str = None, headers: dict = None, data=None) dict[source]

Executes a PUT request to the QRS API.

Parameters:
  • endpoint (str) – The API endpoint to call.

  • params (str, optional) – Query parameters to include in the request.

  • headers (dict, optional) – Additional header parameters.

  • data (dict or str, optional) – The JSON payload to include in the request body.

Returns:

JSON response as a dictionary or None if an error occurs.

Return type:

dict

reloadtask_create(app_id, task_name, custom_properties=None, tags: list = None, schema_events: list = None, composite_events: list = None) dict[source]

Creates a reload task for a specified app.

Parameters:
  • app_id (str) – The ID of the app for which the task is created.

  • task_name (str) – The name of the reload task to create.

  • custom_properties (dict, optional) – Dictionary of custom property IDs and their values.

  • tags (list, optional) – List of tag IDs to associate with the task.

  • schema_events (list, optional) – List of schema events to schedule the task.

  • composite_events (list, optional) – List of composite events to schedule the task.

Returns:

JSON response from the API or None if an error occurs.

Return type:

dict