How to configure a REST connection to link Mail & Deploy with Qlik Sense?

How to configure a REST connection to link Mail & Deploy with Qlik Sense?

FIRST CREATED ON 30 May 2023  I  AUTHOR Emma Camacho

Configuring a REST connection to link Mail & Deploy with Qlik Sense allows seamless data integration and interaction between the two platforms. Here’s a brief guide to set up the connection.

1. Create a Mail & Deploy User of API User type and note the Access Key



2. In the App you want to start a M&D Task Create a new REST connection
Data load editor -> Create new connection -> REST


3. REST connection properties

URL
http(s)://<host>:<port>/API?Method=ExecuteTaskAsync&TaskId=<task_id>&Delay=<delay>

Parameter
Description
<host>
is the name of the machine on which Mail & Deploy is running
<port>
is the port on which Mail & Deploy is listening (make sure it’s not blocked by the firewall!)
ExecuteTaskAsync
Instructs Mail & Deploy to execute a task and immediately return from the API call (i.e. the call will not wait until the task execution has finished!)
<task_id>
The ID of the Mail & Deploy task to be executed (in GUID format; i.e. 073da867-be56-4ba5-a095-7d8e14bc99c3)
In Mail & Deploy Management Console, open the task to be executed and copy the following GUID:
<delay>
An optional delay in seconds; very important! 
This is particularly useful if you want to make sure that the task accesses the correct version of the app; when a load script has been completed, it may take a few seconds for Qlik Sense to commit the changes of the app to the database. When Mail & Deploy starts the task execution too fast, it may access the old version of the app rather than the new one. By delaying the execution (e.g. say by 60 seconds, depending on the app size) you can ensure that Qlik Sense has finished saving all app changes before the task execution starts.

Method
POST and leave Request Body empty

Authentication Scheme 
Anonymous

Query headers
Add a new Query header
Name
Value
MailAndDeployAccessKey
Access key from step 1

Allow "WITH CONNECTION"
Enable the option


Name
Name for the connection, for example, ExecuteTask_CreateReportandDistribute

Click Save. Be aware that clicking Save or Test connection will trigger the task execution!



Looking for Additional Guidance?

If you require more detailed information or further assistance, please visit our comprehensive Online Documentation. Our resources are designed to help you navigate all features and functionalities effectively.


    • Related Articles

    • How to start tasks within a reload script in Qlik Sense using a REST connection?

      FIRST CREATED ON 1 Jun 2023 I AUTHOR Emma Camacho Starting tasks within a reload script in Qlik Sense using a REST connection allows you to automate processes and enhance workflow efficiency. Here’s how you can set it up. 1) First configure a REST ...
    • How to get an API Access Key in Mail & Deploy?

      FIRST CREATED ON 1 Jun 2023 I AUTHOR Emma Camacho Obtaining an API Access Key in Mail & Deploy is essential for enabling secure communication between your applications and the Mail & Deploy system. Here's how you can generate and retrieve your API ...
    • How can I start tasks using Curl.exe?

      FIRST CREATED ON 1 Jun 2023 I AUTHOR Emma Camacho Starting tasks using Curl.exe provides a simple and flexible way to automate actions via the command line. Here's a quick guide on how to initiate tasks with Curl.exe. To start a Task using CURL.EXE, ...