Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagec#
using System;
using System.Security.Cryptography.X509Certificates;
using Connexion.GatewayCore.ApiWebApi;

namespace GatewayApiClientTestCxnApiClient
{
    class Program
    {
        static void Main(string[] args)
        {
            // load the certificate to pass to the gatewaycxn api
            var certificate = new X509Certificate2(@"c:\gatewayClientcxnApi\NickLaptopapiCertificate.cer");

            // create a proxy to the GWapi
            using (var proxy = GatewayApiProxyFactoryConnexionApiProxyFactory.CreateProxy("192127.1680.30.191", 80858087, certificate))
            {
                // test the connection
                var result = proxy.ServiceMethods.Ping();.GetGroupsAndTabsAsync(new GetGroupsAndTabsRequest(true)).Result;
                foreach (var group in result.Groups)
                {
                    foreach (var tab in group.Tabs)
                    {
                        Console.WriteLine($"{group.Name} ({group.GroupKey}) / {tab.Name} ({tab.TabKey})");
                    }
                }
            }

            Console.ReadLine();
        }
    }
}

...

At this point, you can now make API calls to create and modify non-authorized remote agents. In the future, we may enable specific updates to authorized remote agents.

...

. Please use the async/await pattern (the above code is a contrived example only).