Skip to main content
Document boards are being consolidated, this board no longer allows NEW documents READ MORE

QlikView Management API - #1 Setting up a Visual Studio project

Showing results for 
Search instead for 
Did you mean: 

QlikView Management API - #1 Setting up a Visual Studio project

Last Update:

Nov 21, 2012 6:40:10 AM

Updated By:


Created date:

Nov 21, 2012 6:40:10 AM



This document is part of a series of documents that discuss how to use the QlikView Management API. You can find the index for these documents Here.

The Management API is a web service against which you can issue a range of commands to automate management activities on a QlikView environment.  There are a couple of prerequisite set up items to do before you can use it and the web service has to be used in a particular way. This document describes how you can configure a Visual Studio project to work with the web service.

An example starter Visual Studio project pre-configured to use the API is attached to this document. The free versions of Visual Studio can be used although some of the screens described below may be slightly different.

Using the API

Step 1 – Set Permissions

To be able to make calls to the management service the request needs to come from a user context with membership of a specific group on the QlikView server.  For most API calls the user needs to be a member of the “QlikView Management API” group, this groups is not created by the QlikView installer and so must be created and the relevant users added.

Depending on the type of application you are building you need to use an appropriate way of running the code as a particular user.  For example:

  • If you have a desktop application, it can run using the login ID of the current user
  • If you have a web page then either the user ID of the web site OR the user ID of the person browsing can used
  • If you always want a specific user to be used to call commands you can embed this into the code

Further discussion of this subject can be found HERE (TBC)

Step 2 – Create a project & Reference the QlikView Management Web Service

Open Visual Studio and start a new project for the type of solution you want to use.  For the example and instructions provided it is a basic console application but the process works the same for, WinForms etc.

The first step is to connect the QMS API to visual studio by adding a Service Reference


Into the service reference dialogue enter the following URL adjusting for your particular QlikView server address -  http://localhost:4799/QMS/Service - click the Go button and it will connect and validate that the service exists.  Provide a meaningful name for this reference, for example QMSAPIService. It should look as below


Step 2 – Configure Visual Studio to use a Service Behaviour

The QMS web service requires the presence of a HTTP header containing a “service key” representing your user session with the server.  This must be injected into every request and while this is a fairly complex thing to do, QlikView provides the code required to do this in .net projects.

Firstly in Visual Studio create a new folder called ServiceSupport in the root of the projects folder structure.

Download the attached "" file and extract the 3 files starting with “ServiceKey…cs”.  Now right click  the folder the folder you created above and click “Add | Existing Item” browse to where you saved the files, select all 3 and click Add.  The structure of your project should now look like the below.


Next each of these three files needs to have its namespace edited to match the namespace of your entire project.  So open each file and locate the line that will look like this

namespace QMSAPIStarter.ServiceSupport

The namespace of your project will match the name of the project if you didn’t change it and in the above case the text you would change is QMSAPIStarter, leave the ServiceSupport part present

Next open web.config or app.config depending on the type of project you have.  Locate the opening tag called <system.serviceModel> and immediately after this  paste the below entry



<add name="serviceKeyBehavior" type="QMSAPIStarter.ServiceSupport.ServiceKeyBehaviorExtensionElement, QMSAPIStarter, Version=, Culture=neutral, PublicKeyToken=null"/>





<behavior name="ServiceKeyEndpointBehavior">





Notice in the code there are TWO references to the namespace for the code we added above, make sure BOTH of these match the namespace of your project.

Finally locate the following block in the config file

<endpoint address="http://localhost:4799/QMS/Service" binding="basicHttpBinding"

bindingConfiguration="BasicHttpBinding_IQMS" contract="QMSAPIService.IQMS"

name="BasicHttpBinding_IQMS" />

Before the closing tag add behaviorConfiguration="ServiceKeyEndpointBehavior"

Save and close the config file.

Step 3 – Create an object to communicate with the API and add the Service Key

The next step is to write the first piece of code to communicate with the web service, handle the service key and from then on the API functions can be used.

Create the item you want to work with, in this example I am creating a simple class and writing code into the Main method, if you are working with a web page you can locate the code, on load or on the click of a button.

At the top of your code page add the following statements to reference the support functions and the API itself (correct namespace accordingly):

using QMSAPIStarter.QMSAPIService;

using QMSAPIStarter.ServiceSupport;

Now into the function you are using paste the below code.  This creates the “QMSClient” object from which all subsequent API calls will be made, and packages the service key required to use it.  Here i have hard coded the URL to QMS Web Service if you leave it out it will pick up the URL from your config file.

            QMSClient Client;

            string QMS = "http://localhost:4799/QMS/Service";

            Client = new QMSClient("BasicHttpBinding_IQMS", QMS);

            string key = Client.GetTimeLimitedServiceKey();

            ServiceKeyClientMessageInspector.ServiceKey = key;

The ServiceKey is the token that represents your session with the API.  Once the token is obtained it is valid for 20 minutes however this period is extended after each call to the API so you should only need to request a key once.

Step 4 – Issue an API command

Now it is possible to issue commands against the API.  Below is a simple function that will ask for the list of services on the QlikView server and print out their names.

            ServiceInfo[] myServices = Client.GetServices(ServiceTypes.All);

            foreach (ServiceInfo service in myServices)




Build your project and execute it to see the results.    You can now build and run your own applications using the API. 

There are a number of objects, types and methods included in the API - Check out the list of examples to see how they can use - see Here

Labels (1)

In QlikView 11 works ok, but in 12 I have problems and not work.

Someone could make it work in 12 with the new service of that version ?



I found in the reported bugs for version 12.20, this


Partner - Contributor III
Partner - Contributor III

Is there a solution for this error?



  Message=Could not find endpoint element with name 'BasicHttpBinding_IQMS' and contract 'QMSAPIService.IQMS' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this name could be found in the client element.



   at System.ServiceModel.Description.ConfigLoader.LoadChannelBehaviors(ServiceEndpoint serviceEndpoint, String configurationName)

   at System.ServiceModel.ChannelFactory.ApplyConfiguration(String configurationName, Configuration configuration)

   at System.ServiceModel.ChannelFactory.ApplyConfiguration(String configurationName)

   at System.ServiceModel.ChannelFactory.InitializeEndpoint(String configurationName, EndpointAddress address)

   at System.ServiceModel.ChannelFactory`1..ctor(String endpointConfigurationName, EndpointAddress remoteAddress)

   at System.ServiceModel.ConfigurationEndpointTrait`1.CreateSimplexFactory()

   at System.ServiceModel.ConfigurationEndpointTrait`1.CreateChannelFactory()

   at System.ServiceModel.ClientBase`1.CreateChannelFactoryRef(EndpointTrait`1 endpointTrait)

   at System.ServiceModel.ClientBase`1.InitializeChannelFactoryRef()

   at System.ServiceModel.ClientBase`1..ctor(String endpointConfigurationName, String remoteAddress)

   at QMSAPIStarter.QMSAPIService.QMSClient..ctor(String endpointConfigurationName, String remoteAddress) in C:\Users\hkrauth\source\repos\QMSAPIStarter\QMSAPIStarter\Connected Services\QMSAPIService\Reference.cs:line 14793

   at QMSAPIStarter.Program.Main(String[] args) in C:\Users\hkrauth\source\repos\QMSAPIStarter\QMSAPIStarter\Program.cs:line 28



i want to retrieve with license information (Professional and Analyzer Users licenses) via QMS API.

Previously i used QMS API to get named and document CAL: with the the new license method (based on access type) i can't find the methods.

I have QlikView May 2021 SR1 (on premise).

Thanks in advance,



I want to use GetLoadedDocuments Method in QlikView May 2022, but I don't see this method in service.
Is any option to turn it on?





Version history
Last update:
‎2012-11-21 06:40 AM
Updated by: