Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
jerry_ile
Contributor III
Contributor III

REST API - how to pass a query object?

I'm new to API's and hoping someone can enlighten me.

I'm using QLik Sense and can use the REST API with the GET method to and do simple filtering through the URL

e.g.

http://URL/api/supplyorder?status=1

but if I wanted to pull statuses 1 and 4 the documentation says I need to pass a query object as this will not work using the URL Filter

The example shows I can perform a request containing a query object array like this but how do I perform this in QLIK Sense? I've tried adding this to the WITH CONNECTION using the Query parameter in various forms but had no joy

{
    "query": [
        {
            "field": "status",
            "operator": "=",
            "value": "1"
        },
        {
            "conjunction": "|",
            "field": "status",
            "operator": "=",
            "value": "4"
        }
    ]
}

 

 

Labels (1)
1 Solution

Accepted Solutions
Gysbert_Wassenaar

I think you'll have to use a POST request and use the query object as body. Try using Postman to work out what exactly you need to send to the rest api. Once you've got that working you can configure the rest connector to do the same. You'll know which headers and query parameters you need and what the body of the post request should be. 


talk is cheap, supply exceeds demand

View solution in original post

1 Reply
Gysbert_Wassenaar

I think you'll have to use a POST request and use the query object as body. Try using Postman to work out what exactly you need to send to the rest api. Once you've got that working you can configure the rest connector to do the same. You'll know which headers and query parameters you need and what the body of the post request should be. 


talk is cheap, supply exceeds demand