Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have an application that uses the .NET SDK (latest version, 16.3.0) that extracts data from some Qlik Sense objects, using the following code:
var obj = app.GetObject<GenericObject>("my-object-id");
var result = obj.ExportData(format, "/qHyperCubeDef", "out.xlsx", NxExportState.EXPORT_POSSIBLE);
This works perfectly with Qlik Sense Enterprise on-premise, however it fails in Qlik Sense SaaS, throwing an exception that says:
Qlik.Engine.MethodInvocationException: Access denied [5]:Access denied(ExportData)
at Qlik.Engine.Communication.QlikConnection.AwaitResponseTask[T](T task, String methodName, CancellationToken cancellationToken)
at Qlik.Engine.Communication.QlikConnection.AwaitResponse[T](Task`1 task, String methodName, CancellationToken cancellationToken)
at Qlik.Engine.GenericObject.ExportData(NxExportFileType fileType, String path, String fileName, NxExportState exportState, Boolean serveOnce)
Any idea why this isn't working? I tested exporting the same object manually from the browser (right click -> download) while connected with the same user I'm using with the SDK and it works correctly, so it doesn't seem to be a permission problem like the error message seems to imply...
That method is not available in QCS. May not be obvious at first sight, but there's a actually a remark in the documentation that states so:
It's somewhat more visible in the raw engine API documentation:
The flow for exporting data is handled differently in QCS, and you need to go through REST APIs to do so. There's a small example illustrating how to utilize the reporting service available here:
That method is not available in QCS. May not be obvious at first sight, but there's a actually a remark in the documentation that states so:
It's somewhat more visible in the raw engine API documentation:
The flow for exporting data is handled differently in QCS, and you need to go through REST APIs to do so. There's a small example illustrating how to utilize the reporting service available here:
As always, thanks for your quick and precise answers 👍
I'll study the API and see if I can re-implement the same flow. From what I can see from the docs, compared to the Enterprise Edition:
Will post my findings when I've tested it. Thanks again for your support 👍
I've tried this solution and it works, thank you again.
One more question though: I noticed in the documentation that the "type" property in the OutputItem definition supports various values, including csv.
However, it doesn't seem to work, if I try to use "csv" instead of "xlsx" I get the following error:
{
"code": 400,
"errors": [
{
"code": "REP-400000",
"detail": "unsupported output type csv for sense-data-1.0 template",
"title": "bad or malformed http request"
}
],
"message": "bad or malformed http request"
}
Is CSV output just not supported at all? Or am I just not building the request correctly?
The documentation is quite strange, because it states:
csv doesn't have csv output
Maybe I'm dumb, but what is that sentence even supposed to mean?
Hmm... I do seem to remember that CSV export wasn't supported, but I don't remember the status of it. And that documentation could use some love and attention I guess...
Thanks for the confirmation, I suspected it wasn't supported but the "csv" type in the docs made me doubt.
I am getting when I followed https://github.com/kolsrud/qlik_rest_sdk/blob/master/Qlik.Sense.RestClient/Examples/QcsExportExcel/P...
One or more errors occurred. (400: Bad Request, {"code":400,"message":"Query string not allowed","errors":[{"code":"REP-400000","title":"Query string not allowed"}]} error when authenticate with Session.
Instead of client.AsApiKeyViaQcs(apiKey); I used client.AsExistingSessionViaQcs(qcsSessionInfo); since I have different section access for different users, i want to export only data related to those users. Also, is there any documentation of bookmarks?
Also if I use AsJsonWebTokenViaQCS
i am getting One or more errors occurred. (400: Bad Request, {"code":400,"message":"bad or malformed http request","errors":[{"code":"REP-400020","detail":"The issuer is not compatible with a non browser like request" .. Error.
We currently moved from Qlik On-prem to Qlik Cloud and that has resulted in Broken export functionality, We were using genericObject.ExportData(NxExportFileType.EXPORT_OOXML) but for that i am getting Access Denied Error.
Just FYI your examples no longer appear to exist or the links are broken.