Skip to main content Skip to complementary content
Close announcements banner

GetQVPRAPISettings Method

Overloads

GetQVPRAPISettings()

Gets QVPR settings.

GetQVPRAPISettings()

Gets QVPR settings.

Declaration

      QVPRAPISettings GetQVPRAPISettings()
    

Returns

Type Description
QVPRAPISettings

Current QVPR settings

Remarks

security

Requires membership of local groups QlikView Management API and QlikView Administrator.

Examples

The following code example uses the QMS API to retrieve QVPR XML settings. It changes the QVPR backup path and then saves the QVPR settings. If everything goes well, it prints the original backup path and then a message when it's done. If anything goes wrong, it prints an error message.

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();
    }
}
  

See Also

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!

Join the Analytics Modernization Program

Remove banner from view

Modernize without compromising your valuable QlikView apps with the Analytics Modernization Program. Click here for more information or reach out: ampquestions@qlik.com