Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Alexander_Thor
Employee
Employee

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
})

View solution in original post

5 Replies
Alexander_Thor
Employee
Employee

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
})

Aiham_Azmeh
Employee
Employee

Hi Alexander,

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

aiham

Not applicable
Author

Hi Alexander,

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

Best, Simon

Alexander_Thor
Employee
Employee

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.

Alexander_Thor
Employee
Employee

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.