Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
amien
Specialist
Specialist

difference between a .NET SDK and API approach

I'm building a tool in Visual Studio .NET SDK.  But as i think of it, it could also be done with an API approach.

What would be the pro's en con's using the API when you are using Visual Studio C#? What would be the benefit of using the .NET SDK?

Thanks in advanced.

1 Solution

Accepted Solutions
Øystein_Kolsrud
Employee
Employee

I'm not sure what you mean by Visual Studio .Net SDK and API approach. Do you mean the Qlik Sense .Net SDK vs using the Json RPC API for the engine directly?

The .Net SDK is basically a wrapper for the engine API and provides a couple of convenient features for dealing with that API in a .Net environment. It takes care of things like authentication, request/response management, change notification, etc. And of course the .Net SDK enables intellisense and typing for the structures used by the API.

View solution in original post

7 Replies
Øystein_Kolsrud
Employee
Employee

I'm not sure what you mean by Visual Studio .Net SDK and API approach. Do you mean the Qlik Sense .Net SDK vs using the Json RPC API for the engine directly?

The .Net SDK is basically a wrapper for the engine API and provides a couple of convenient features for dealing with that API in a .Net environment. It takes care of things like authentication, request/response management, change notification, etc. And of course the .Net SDK enables intellisense and typing for the structures used by the API.

amien
Specialist
Specialist
Author

Yes, thats what i mean . Thanks for your reply.

amien
Specialist
Specialist
Author

@yko

Is it possible to use the SDK for authorization and alot more.. and the API for stuff that is not in the SDK. for example load the dataconnections without opening an app. Or the task list.

I ask this because want the authorization done using the SDK and that i don't need to do the authorization again for the API.

Basiclly i want to avoid this code:

            string xrfkey = "0123456789abcdef";

            HttpWebRequest request = (HttpWebRequest)WebRequest.Create(@"https://url/qrs/about?xrfkey=" + xrfkey);

            request.Method = "GET";

            request.UserAgent = "Windows";

            request.Accept = "application/json";

            request.Headers.Add("X-Qlik-xrfkey", xrfkey);

            request.UseDefaultCredentials = true;

           

Because the autorization is already in place using the SDK

Øystein_Kolsrud
Employee
Employee

No, unfortunately not. The .Net SDK has only been design for engine access. The engine API is access through web sockets, so all authentication for the SDK deals with that situation. As the QRS API is a rest API accessed through Http calls, it has a different authentication mechanism.

amien
Specialist
Specialist
Author

But is a mix of the SDK and the API always needed? for example, what if you want to get a list of all app. And foreach app you want : the tables/fields in the data model and the task that reloads the app.

From what i'v seen for far.. the list of app i can get with both the API (using paths) en SDK. The tasks i can only get from the API. And the tables i can only get using the SDK (Not the API unless i do a WS request).

Is the above true. And if this is the case. This would mean that i need to authenticate for both the API en the SDK. Or Not?

Øystein_Kolsrud
Employee
Employee

Well, I guess you could summarize it like this: if you want to access the app contents, then you need to use the engine API, if you want to access the app context, then you will need to use the QRS API.

Since the engine API is based on web sockets, and the QRS API is based on REST, the authentication differs quite a lot between the two.

But I guess there are many use cases where you will need to access both to some degree.

amien
Specialist
Specialist
Author

All clear now yko ! Thanks