Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Highlighted
jerry_ile
New 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 (4)
1 Solution

Accepted Solutions
MVP & Luminary
MVP & Luminary

Re: REST API - how to pass a query object?

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
1 Reply
MVP & Luminary
MVP & Luminary

Re: REST API - how to pass a query object?

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