ConfigApiSharp 1.2.0

A simple Milestone Advanced VMS Configuration API client builder. Contains a simple to use static class to help build the WCF client proxy used to communicate with the Milestone XProtect Management Server ConfigurationApiService, as well as the ServerCommandService.

Install-Package ConfigApiSharp -Version 1.2.0
dotnet add package ConfigApiSharp --version 1.2.0
<PackageReference Include="ConfigApiSharp" Version="1.2.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ConfigApiSharp --version 1.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

ConfigApiSharp

Creating a Configuration API proxy client for interfacing with a Milestone Advanced VMS Management Server has a bit of boilerplate involved. In it's present state, this project simply provides a sort of "factory" mechanism for producing a config API client or ServerCommandService client, saving the headache of making sure the client is setup properly.

This is basically all documented and almost entirely copy/pasted from Milestone's MIP SDK documentation with some minor tweaks, so no magic sauce here. Just a conventient wrapper that I intend to use for myself going forward.

Getting Started

Interfacing with the Configuration API does not specifically require the use of MIP SDK component libraries. This proxy was created by pulling the WSDL from an existing XProtect Corporate 2018 R2 system, and if you're not taking advantage of the built-in configuration item types (eg. Hardware, Camera, RecordingServer etc), then you can do a lot of helpful configuration related operations just using the WCF proxy client. Simply re-use the source here in your own project or add the ConfigApiSharp nuget package. Below is a sample console application where you can supply the login parameters as arguments and simply print the Management Server information to console.

using ConfigApiSharp;
using System;
using System.Linq;


namespace ConfigApiTest
{
  static class Program
  {
    static void Main(string[] args)
    {
        var host = "mgtsrv1";
        var port = 80;
        var result = ConfigApiSharp.ClientFactory.BuildConfigApiClient(host, port, UserType.CurrentUser);
        if (result.Success)
        {
            var client = result.Client;
            var managementServer = client.GetItem("/");
            foreach (var property in managementServer.Properties)
            {
                Console.WriteLine($"{property.DisplayName} : {property.Value}");
            }
        }
    }
  }
}

ConfigApiSharp

Creating a Configuration API proxy client for interfacing with a Milestone Advanced VMS Management Server has a bit of boilerplate involved. In it's present state, this project simply provides a sort of "factory" mechanism for producing a config API client or ServerCommandService client, saving the headache of making sure the client is setup properly.

This is basically all documented and almost entirely copy/pasted from Milestone's MIP SDK documentation with some minor tweaks, so no magic sauce here. Just a conventient wrapper that I intend to use for myself going forward.

Getting Started

Interfacing with the Configuration API does not specifically require the use of MIP SDK component libraries. This proxy was created by pulling the WSDL from an existing XProtect Corporate 2018 R2 system, and if you're not taking advantage of the built-in configuration item types (eg. Hardware, Camera, RecordingServer etc), then you can do a lot of helpful configuration related operations just using the WCF proxy client. Simply re-use the source here in your own project or add the ConfigApiSharp nuget package. Below is a sample console application where you can supply the login parameters as arguments and simply print the Management Server information to console.

using ConfigApiSharp;
using System;
using System.Linq;


namespace ConfigApiTest
{
  static class Program
  {
    static void Main(string[] args)
    {
        var host = "mgtsrv1";
        var port = 80;
        var result = ConfigApiSharp.ClientFactory.BuildConfigApiClient(host, port, UserType.CurrentUser);
        if (result.Success)
        {
            var client = result.Client;
            var managementServer = client.GetItem("/");
            foreach (var property in managementServer.Properties)
            {
                Console.WriteLine($"{property.DisplayName} : {property.Value}");
            }
        }
    }
  }
}

Release Notes

Added WcfSettings class for customizing timeouts and other WCF binding properties. Also updated interfaces against current 2019 R1 WSDL.

Dependencies

This package has no dependencies.

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.2.0 142 4/25/2019
1.1.0 315 7/3/2018
1.0.1 298 1/29/2018
1.0.0 394 1/27/2018