Z9.Flex.Community 1.0.1

dotnet add package Z9.Flex.Community --version 1.0.1
                    
NuGet\Install-Package Z9.Flex.Community -Version 1.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Z9.Flex.Community" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Z9.Flex.Community" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Z9.Flex.Community" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Z9.Flex.Community --version 1.0.1
                    
#r "nuget: Z9.Flex.Community, 1.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Z9.Flex.Community@1.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Z9.Flex.Community&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=Z9.Flex.Community&version=1.0.1
                    
Install as a Cake Tool

Z9/Flex Community Profile

This repository contains the OpenAPI specification for the Z9/Flex JSON/REST API - Community Profile.

Overview

The Community Profile is a profile of Z9 Security's Z9/Flex API, designed to be the interface and data model for an open, interoperable access control platform.

See Also

Z9/Flex and Z9/Open

For more information about the commercial version of Z9/Flex, visit z9flex.com.

For more information about the commercial version of Z9/Open, visit z9open.com.

Z9/FL=X is a registered trademark of Z9 Security. z9/op=n is a registered certification mark of Z9 Security.

License

Apache 2.0 - see LICENSE for details.

Files

  • z9flex-swagger-community.yaml - OpenAPI 3.0 specification
  • z9flex-client-csharp/ - C#/.NET client library

Usage

The swagger file can be used with OpenAPI tools to generate client libraries in various languages.

C# Client Library

The z9flex-client-csharp/ directory contains a C#/.NET client library (Z9.Flex.Community) for the Z9/Flex Community Profile API. It is built using Microsoft Kiota to auto-generate a strongly-typed REST client from the OpenAPI specification.

The library targets .NET Standard 2.0, making it compatible with .NET Framework 4.7+, .NET Core 2.0+, and .NET 6+.

Getting Started

Create an authentication provider and adapter, then use the client to make API calls:

var handler = new WinHttpHandler
{
    ServerCertificateValidationCallback = (message, certificate2, arg3, arg4) => true
};

var authenticationProvider = Z9AuthenticationProvider.CreateInstance(baseUrl,
    () => (username: z9Username, password: z9Password), handler);

var adapter = new HttpClientRequestAdapter(authenticationProvider,
        httpClient: new Z9HttpClient(handler, authenticationProvider))
    { BaseUrl = baseUrl };

var flexClient = new Z9Flex.Client.FlexClient(adapter);

Then use the client to interact with the API:

var devices = await flexClient.Dev.List.GetAsync();
var schedules = await flexClient.Sched.List.GetAsync();

Regenerating the Client

The auto-generated client code can be regenerated from the swagger using Microsoft Kiota:

dotnet tool install --global Microsoft.OpenApi.Kiota

kiota generate -l CSharp -c FlexClient -n Z9Flex.Client \
  -d z9flex-swagger-community.yaml \
  -o z9flex-client-csharp/src/Z9Flex/Client

After generation, apply the following post-processing fix to the generated models. Kiota generates unqualified Time? references that conflict with System.Time, so they must be fully qualified:

In z9flex-client-csharp/src/Z9Flex/Client/Models/SchedElement.cs, replace:

public Time? Start { get; set; }
public Time? Stop { get; set; }

with:

public Microsoft.Kiota.Abstractions.Time? Start { get; set; }
public Microsoft.Kiota.Abstractions.Time? Stop { get; set; }

Publishing to NuGet

Pushing a version tag triggers the CI pipeline to build and publish the Z9.Flex.Community package to nuget.org:

Find the latest version and tag the next:

git tag --sort=-v:refname | head -1
git tag v1.0.1
git push origin v1.0.1

Note: This requires a NUGET_API_KEY secret configured in the repository's GitHub Actions settings.

Verify the package is published:

curl -s https://api.nuget.org/v3-flatcontainer/z9.flex.community/index.json
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.1 133 2/22/2026