| IQMS2UpdateServices Method (DictionaryGuid, Uri, ServiceTypes) |
Namespace: PIX.Services.V12.Api2
ServiceUpdateStatus UpdateServices( Dictionary<Guid, Uri> serviceURLs, ServiceTypes serviceType )
Requires membership of local group QlikView Management API and the role Document Folder 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 System.Linq; 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(); //create the QVS service and add it to the dictionary Dictionary<Guid, Uri> dictionary = new Dictionary<Guid, Uri>(); dictionary.Add(Guid.NewGuid(), new Uri("qvsUriAddress")); //update the QVS service ServiceUpdateStatus status = apiClient.UpdateServices(dictionary, ServiceTypes.QlikViewServer); //print the status of the update Console.WriteLine("Status of the update: " + status); } catch(Exception e) { Console.WriteLine("An error occured: " + e.Message); } // wait for user to press any key Console.ReadLine(); } }