Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
Not applicable

Qlik Sense Mashup - URL for JSON request

Dear all,

I try to create a mashup application with QlikSense (Desktop). Now my question is, which URL I can use to send the JSON request to (for example 'method:doReload'). I know the workbench/Protocoltester tool. But I didn't find an URL where I can post the JSON-string to. Is it http://localhost:4848/ ?

Any help would be much appreciate.

Best, Simon

1 Solution

Accepted Solutions
akl
Not applicable

Re: Qlik Sense Mashup - URL for JSON request

Hi Simon,

So there exists several different APIs, when you are building your website you are leveraging the Mashup API.
The Protocol tester is to test the underlying Engine API which is our websocket protocol to communicate with the engine.

However you don't need to construct your own message for a reload as that is part of the Mashup API.

You can have a look at the documentation over here, https://help.qlik.com/sense/en-us/developer/index.html#../Subsystems/Workbench/Content/BuildingWebsi...

Or in short just call app.doReload() which will return a promise.

If you need to act on the completion of a reload you can listen for when the promise resolves, app.doReload().then(function(reply) {
     console.log(reply) //Success or Failure
})

5 Replies
akl
Not applicable

Re: Qlik Sense Mashup - URL for JSON request

Hi Simon,

So there exists several different APIs, when you are building your website you are leveraging the Mashup API.
The Protocol tester is to test the underlying Engine API which is our websocket protocol to communicate with the engine.

However you don't need to construct your own message for a reload as that is part of the Mashup API.

You can have a look at the documentation over here, https://help.qlik.com/sense/en-us/developer/index.html#../Subsystems/Workbench/Content/BuildingWebsi...

Or in short just call app.doReload() which will return a promise.

If you need to act on the completion of a reload you can listen for when the promise resolves, app.doReload().then(function(reply) {
     console.log(reply) //Success or Failure
})

aaz
Not applicable

Re: Qlik Sense Mashup - URL for JSON request

Hi Alexander,

What about your posted extension: QSocks - Engine API wrapper ? Can that help ?

aiham

Not applicable

Re: Qlik Sense Mashup - URL for JSON request

Hi Alexander,

Thank you very much for your help! app.doReload() just worked for me!

Best, Simon

akl
Not applicable

Re: Qlik Sense Mashup - URL for JSON request

Awesome!

So you could think of the extension and mashup api as a abstraction layer on top of the Engine API which is our websocket protocol. So there won't be a url per se that you can post to like you would against a rest based api.

But in theory you could send a request over the already opened socket if you wanted to.

If you have a instance off the app class you should find it on app.model.session.socket.send() however as you don't have a great way of listening for the response it would be more for one off kind of messages.

akl
Not applicable

Re: Qlik Sense Mashup - URL for JSON request

Yeah I guess it could work, but it would open a new socket connection to the engine and then also consume an additional license unless you figure out a way to share the same session mark I guess.