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

Duplicate App using .NET SDK

Hi,

We're building our own Web application using Qlik Sense .NET SDK. And we're trying to re-create the process of duplicating an existing App (same as in QMC).


From what I've researched the only option is to use copyApp method:

using (var hub = location.Hub())

{

    hub.CopyApp(destApp.AppId, srcApp.AppId, <array of QRS identifiers>);

}

Documentation says that we can get QRS identifiers from from the following path:

/qrs/app/9c3f8634-6191-4a34-a114-a39102058d13 Where 9c3f8634-6191-4a34-a114-a39102058d13 is the identifier of the app

but it simply returns App object specific data and nothing about child objects.

So the question is:
is there any fast way to get QRS identifiers without drilling down every child object of an App and getting its GUID?

Perhaps there is a different method on how to achieve the same result?

Any help is appreciated!

Regards,
Rustam

1 Solution

Accepted Solutions
Employee
Employee

Re: Duplicate App using .NET SDK

Just to be clear, the other thread you are linking to refers to /qrs/about and has nothing to do with this endpoint.

Perhaps you can supply some more sample code as the endpoint /qrs/app/{id}/copy works just fine, QMC uses it to duplicate apps for example.

4 Replies
Not applicable

Re: Duplicate App using .NET SDK

Hi,

For what you want to do there is a rest API /qrs/app<id>/copy?name=<destination appname>

Best regards

Lars-Göran Book

Not applicable

Re: Duplicate App using .NET SDK

Hi,

sorry for such delayed answer.

Unfortunately the path you advised does not exist.

Here is an integration test that fails:

[Fact]

public void QrsApi_CopiesAppCorrectly()

{

     var response = MakeRequest("app/fc44a98a-499a-4569-930f-fe1bc7f96326/copy?name=AppCopy");

     Assert.Equal(HttpStatusCode.OK, response.StatusCode);

}

while this one succeeds:

[Fact]

public void QrsApi_CanBeCalled()

{

     var response = MakeRequest("app");

     Assert.Equal(HttpStatusCode.OK, response.StatusCode);

}

As answered in this thread: Get list of available endpoints (paths) QRS API there is a bug in documentation.

Currently we are using version 1.1 and the problem still persists.


Let's just hope that this endpoint will be available in the next build.

Employee
Employee

Re: Duplicate App using .NET SDK

Just to be clear, the other thread you are linking to refers to /qrs/about and has nothing to do with this endpoint.

Perhaps you can supply some more sample code as the endpoint /qrs/app/{id}/copy works just fine, QMC uses it to duplicate apps for example.

Not applicable

Re: Duplicate App using .NET SDK

Hi, Alexander.

Thanks for the reply.
Indeed everything works fine, tests now succeed.

We moved to using certificates, so perhaps the problem was that I tried making POST requests while using windows authentication.

Community Browser