Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
The following methods were using in our legacy qliksense application, want to migrate in SAAS. what are the equivalent in SAAS.
this.$qlikSenseApp.visualization.create
exportData
$qlikSenseApp.model.getProperties
variable.setStringValue
this.$qlikSenseApp.variable.setStringValue
this.$qlikSenseApp.createCube
this.$qlikSenseApp.field
thanks in advance.
Hi @agilank , since this is a matter of capability APIs, I'm moving this to the API sub-forum...
You could continue using the Capabilities API in SaaS, in which case, everything would just function as is. You would need to revisit your authentication method, but the library would be used in the exact same way.
If you are looking to move away from capabilities API, it sort of depends on what you're trying to accomplish. If you're purely looking at using engine calls (createCube, field, etc), then you'd look at qlik-api (https://github.com/qlik-oss/qlik-api-ts), if you are looking to embed visualizations, then you'd be looking at: qlik-embed (https://qlik.dev/embed/qlik-embed/why-qlik-embed/).
That said, Capabilities API was both providing some helper functions around visualizations, as well as wrapping Engine API functionality. So stuff that isn't visualization specific, can be done using the base Engine API. Reference here: https://help.qlik.com/en-US/sense-developer/February2024/Subsystems/EngineJSONAPI/Content/introducti...
Sandbox here:
https://qixplorer.qlik.dev/
Off the top of my head:
- not entirely sure this is possibly yet with qlik-embed, being able to create charts on the fly
- if you want to embed a chart, then export the data, you would use qlik-embed, embed the chart, then do something like:
const element = document.getElementById(<hidden-qlik-embed-element-id>);
const refApi = await element.getRefApi();
then
const doc = await refApi.getDoc();
const object = await refApi.getObject();
or
const chartRefApi = await refApi.getChartRefApi();
Once you have an object, you can call exportData as per the engine API reference (https://help.qlik.com/en-US/sense-developer/February2024/Subsystems/EngineJSONAPI/Content/service-ge...).
If you don't want to embed, and just get the data, the engine call 'getObject()' would do the trick.
This can also be run on a generic Object. The functiong being .getProperties(). https://help.qlik.com/en-US/sense-developer/February2024/Subsystems/EngineJSONAPI/Content/service-ge...
For all variable stuff, there is a 'createVariable' function in the doc class, then all the same variable functions exist on the variable object.
https://help.qlik.com/en-US/sense-developer/February2024/Subsystems/EngineJSONAPI/Content/service-do...
https://help.qlik.com/en-US/sense-developer/February2024/Subsystems/EngineJSONAPI/Content/service-ge...
your likely best option is .createSessionObject: https://help.qlik.com/en-US/sense-developer/February2024/Subsystems/EngineJSONAPI/Content/service-do...
and pass in the same hypercube.
similar to the GenericVariable API, the Field API should have everything you need.
Hope that helps,
-Jesse