Skip to main content Skip to complementary content

UpdateServices Method

Overloads

UpdateServices(IDUrlDictionary, ServiceTypes)
UpdateServices(Dictionary<Guid, Uri>, ServiceTypes)

Updates the service with the specified URLs of the specified type.

UpdateServices(IDUrlDictionary, ServiceTypes)

Declaration

      ServiceUpdateStatus UpdateServices(IDUrlDictionary serviceURLs, ServiceTypes serviceType)
    

Parameters

Type Name Description
IDUrlDictionary serviceURLs
ServiceTypes serviceType

Returns

Type Description
ServiceUpdateStatus

UpdateServices(Dictionary<Guid, Uri>, ServiceTypes)

Updates the service with the specified URLs of the specified type.

Declaration

      ServiceUpdateStatus UpdateServices(Dictionary<Guid, Uri> serviceURLs, ServiceTypes serviceType)
    

Parameters

Type Name Description
System.Collections.Generic.Dictionary<System.Guid, System.Uri> serviceURLs

The dictionary of the URL addresses of the service and their IDs.

ServiceTypes serviceType

The type of the service.

Returns

Type Description
ServiceUpdateStatus

Status of the update.

Remarks

security

Requires membership of local group QlikView Management API and the role Document Folder Administrator.

Examples

The following code example uses the QMS API to add a QlikViewServer (QVS) service. If everything goes well it prints the status of the update. 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 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();
    }
}
  

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