Qlik Community

Qlik Sense Integration, Extensions, & APIs

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

kshitij_wahi
New Contributor

Create app using .Net SDK

Hi,

Need some help, I am trying to create an app using Qlik Sense .Net SDK. For practice purpose I am using the playground url: Qlik Sense

I am getting the following error: "Application could not be created [1006]:create denied()"

Also, I have an account on playground but I am not able to login from the playground page

Also if possible please mention the ways in which we can explore the Qlik Sense .net sdk using some url or may be some other setup


Thanks in advance


Tags (1)
1 Solution

Accepted Solutions
Employee
Employee

Re: Create app using .Net SDK

I think playground block creation of permanent apps, but you should be able to create session apps. So instead of using IHub.CreateApp Method you should use IHub.CreateSessionApp Method.

7 Replies
Employee
Employee

Re: Create app using .Net SDK

I think playground block creation of permanent apps, but you should be able to create session apps. So instead of using IHub.CreateApp Method you should use IHub.CreateSessionApp Method.

kshitij_wahi
New Contributor

Re: Create app using .Net SDK

ok thanks I was doing a location.CreateAppWithName..Can u explain the difference between creating an app through hub and through normal location and also in general what is the difference between doing things through hub and normal location

Employee
Employee

Re: Create app using .Net SDK

The Hub class (and IHub interface) are the .Net wrappers for the class "Global" in in the engine API: Global class ‒ Qlik Sense Developers and it's primary purpose is to provide methods for performing operations that are not associated with the contents of apps. This includes includes among other thing the creation and deletion of apps, but also operations for providing environment information such as product version.

On the other hand, the primary role of the Location class of the .Net SDK is to provide operation for setting up a connection to a Qlik Sense instance. After configuring the connection details of the Location, LocationExtensions.Hub Method provides the gateway to the Hub class. In addition, the Location class provides a number of convenience methods for accessing apps directly, since this is quite often where you in the end want to go. But those methods are just sugar for going through the Hub method (and will actually call it under the hood).

kshitij_wahi
New Contributor

Re: Create app using .Net SDK

thank u so much that was great insight .. one more question are there any methods or classes in the .net sdk for interacting with QMC for generating or managing security rules or other elements of QMC.

Employee
Employee

Re: Create app using .Net SDK

No, the .Net SDK is mostly a wrapper for the Engine API. That part of the product is controlled by the repository, and you'll have to go through it's REST API. You'll find the documentation for that API here:

Qlik Sense repository service API ‒ Qlik Sense Developers

The endpoint for creating security rules is documented here:

Security rule: Create ‒ Qlik Sense Developers

kshitij_wahi
New Contributor

Re: Create app using .Net SDK

I have started using the QRS API, i tried copying an app using one of the endpoints and it is mentioned there that the publisher name will change to who ever is copying the app:

App: Make copy ‒ Qlik Sense Developers

So once the app is copied can i change the name of the publisher of the copied app to the publisher of the original app?

Employee
Employee

Re: Create app using .Net SDK

If I'm not mistaken, you can do a PUT on the app in question and add whatever owner you want. So do GET on it first (something like: GET https://my.server.com/qrs/app/<appid>?xrfxkey=...) and then PUT https://my.server.com/qrs/app/<appid>?xrfxkey=... with the body being the value returned by the GET ...

A trick is to open the debug console of Chrome and have a look at the traffic that occurs when you do the same operation in the QMC. That way you can figure out potential endpoints to use.

Community Browser