Qlik Community

Knowledge

Search or browse our knowledge base to find answers to your questions ranging from account questions to troubleshooting error messages. The content is curated and updated by our global Support team

Announcements
QlikWorld online is next week! REGISTER NOW

How to use the Raw API Request blocks in Qlik Application Automation

cancel
Showing results for 
Search instead for 
Did you mean: 
Emile_Koslowski
Support
Support

How to use the Raw API Request blocks in Qlik Application Automation

This article explains how the Raw API Request blocks in Qlik Application Automation can be used.

Most connectors in Qlik Application Automation have a "Raw API Request" and a "Raw API List Request" block that offer the ability to make an API call to an API resource of your choosing. These blocks will use the connection's account & credentials.

Note: before using these blocks, it's advised to read the API documentation and test the call you want to make in cURL, Postman, or a similar tool.

Below is a detailed overview of these two blocks and how they should be used:

Raw API Request

Path
This block will make an API call to the connector's base URL + a path that's specified in the "Path" input parameter. For example, https://hubspot.com/api/v1/ + users. In each implementation of this block, the connector's base URL is hardcoded.
Note: do not specify any query parameters in the Path parameter. Use the Query Parameters input field instead.

Method
The next parameter is the method that should be used to make the request to the full URL. This can be one of the following methods: GET/POST/PUT/PATCH/DELETE. 

Body Parameters
The Body Parameters input field allows you to build an object of key-value pairs. This object will be converted to a JSON object and will be sent as a body parameter with the request.

Query Parameters
The Query Parameters input field will work similarly to the Body Parameters input field. Except that the final object will be transformed to a query string of the format &key1=value1?key2=value2 and URL encoding will be applied.

See the Raw API Request block of the Qlik Cloud Services connector below as an example:

Emile_Koslowski_2-1633963003979.png

 

Raw API List Request

A limitation of the Raw API Request block is that it does not implement pagination. To retrieve a list of records (that exists out of multiple pages), use the block Raw API List Request. This block has built-in paging so no manual paging with the query parameters is required.

This block will work similarly to the Raw API Request block, except for the method, which will be a GET request in all connectors.

 See the Raw API List Request block of the Qlik Cloud Services connector below as an example:

Emile_Koslowski_1-1633962888945.png

 

The information in this article is provided as-is and to be used at own discretion. Depending on tool(s) used, customization(s), and/or other factors ongoing support on the solution below may not be provided by Qlik Support.

 

Tags (1)
Labels (2)
Comments
igorgois_
Partner
Partner

Great tutorial!

Question: is it possible to use the data-alerts [1] or web-notifications [2]?

I am trying to get a qlik alert result and send it in a slack/teams

I only managed to use the APIs that are in the list:

Available APIs are:

Thanks in advance

[1] https://qlik.dev/apis/#rest-api-data-alerts

[2] https://qlik.dev/apis/#rest-api-web-notifications

Emile_Koslowski
Support
Support

Thanks for the feedback!

We are working on an update to the Raw API Request blocks, this will include data-alerts and web-notifications.

Emile

matsseverin
Partner
Partner

Hi,

Can you please show us an example of using the DELETE method in the Raw API Request block?

I have been trying to use the DELETE method of the Raw API Request block, in combination with the Qlik "Items" API, without any success. More specifically, I'm trying to delete data files in a space.

In the first step I'm using the Raw API List Request to list items (path = items) in a space with the resourceType = dataset. That gives me a list of the qvd's in that space. So far so good.

In the second step I use the Raw API request and the DELETE method, where I use the path = items/{item id}, where item id is based on the list of item ids in the first step. 

That seemingly delete the files when I look in the space, but when I go into the space settings and the Data Sources view, the files are still there? Is this a known issue or am I missing something in my automation blocks?

Thanks,

Mats

Qlik Application Automation

Emile_Koslowski
Support
Support

Hi Mats,

Here's an example of a DELETE method on the Items API to delete a file:

Emile_Koslowski_1-1644486379906.png

 

I get the same behavior as you when I execute the above automation, the file is removed from the catalog but still visible in the space's settings.

I'll raise this with the Items API team. But keep in mind that the DELETE endpoint of the Items API is marked as experimental, so it's best not to use it until it becomes stable.

Kind regards,
Emile

 

 

Version history
Last update:
‎2021-10-18 07:20 AM
Updated by:
Contributors