| IQMS2SetQVPRAPISettings Method |
Namespace: PIX.Services.V12.Api2
Requires membership of local groups QlikView Management API and QlikView Administrator. |
The service key injection is assumed to be handled behind the scenes. For an example of how to inject the service key, see Samples.
using System; using System.Collections.Generic; using QMSAPI; class Program { static void Main(string[] args) { try { // create a QMS API client IQMS2 apiClient = new QMS2Client(); //retrieve a time limited service key ServiceKeyClientMessageInspector.ServiceKey = apiClient.GetTimeLimitedServiceKey(); // get QVPR settings QVPRAPISettings settings = apiClient.GetQVPRAPISettings(); if (settings != null) { // retrieve and print current backup path Console.WriteLine("XML backup path before change: " + settings.XmlBackupPath); // change XML backup path settings.XMLBackupPath = @"\\myfolder\backup"; // save settings apiClient.SetQVPRAPISettings(settings, true); Console.WriteLine("Settings saved. XML backup path changed."); } } catch (Exception ex) { Console.WriteLine("An exception occurred: " + ex.Message); } // wait for user to press any key Console.ReadKey(); } }