Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Alexander_Thor
Employee
Employee

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.

View solution in original post

4 Replies
Not applicable
Author

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
Author

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.

Alexander_Thor
Employee
Employee

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
Author

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.