Purview.EventSourcing.Admin.Client 2.0.0-prerelease.34

This is a prerelease version of Purview.EventSourcing.Admin.Client.
dotnet add package Purview.EventSourcing.Admin.Client --version 2.0.0-prerelease.34
                    
NuGet\Install-Package Purview.EventSourcing.Admin.Client -Version 2.0.0-prerelease.34
                    
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="Purview.EventSourcing.Admin.Client" Version="2.0.0-prerelease.34" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Purview.EventSourcing.Admin.Client" Version="2.0.0-prerelease.34" />
                    
Directory.Packages.props
<PackageReference Include="Purview.EventSourcing.Admin.Client" />
                    
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 Purview.EventSourcing.Admin.Client --version 2.0.0-prerelease.34
                    
#r "nuget: Purview.EventSourcing.Admin.Client, 2.0.0-prerelease.34"
                    
#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 Purview.EventSourcing.Admin.Client@2.0.0-prerelease.34
                    
#: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=Purview.EventSourcing.Admin.Client&version=2.0.0-prerelease.34&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Purview.EventSourcing.Admin.Client&version=2.0.0-prerelease.34&prerelease
                    
Install as a Cake Tool

Purview.EventSourcing.Admin.Client

Purview.EventSourcing.Admin.Client is a typed C# client for the Purview Event Sourcing Admin API, generated by NSwag from the committed OpenAPI document (OpenApi/admin.openapi.json). It exposes strongly-typed methods for every Admin API endpoint and is used by the Admin portal Razor UI (Purview.EventSourcing.Admin.Site) and samples.

Install

dotnet add package Purview.EventSourcing.Admin.Client

Register the client

builder.Services.AddAdminApiClient();

When AdminClientOptions.BaseUrl is not configured, the client sends relative request URIs so it can be pointed at the Admin API's origin by the hosting application:

builder.Services.AddAdminApiClient(options =>
{
    options.BaseUrl = new Uri("https://admin.example.com");
    options.AccessToken = "optional-bearer-token";
});

AddAdminApiClient registers AdminApiClient as a typed HttpClient through IHttpClientFactory. The optional configureClient hook lets callers add delegating handlers (for example to resolve a same-origin base URL from the current HTTP request).

The generated client targets the Admin API route prefix from the OpenAPI document (by default /admin/api).

Usage

var client = serviceProvider.GetRequiredService<AdminApiClient>();

var aggregates = await client.SearchAggregatesAsync(
    new AggregateSearchRequest { AggregateType = "OrderAggregate", PageSize = 25 },
    cancellationToken
);

var events = await client.GetAggregateEventRangeAsync(
    "OrderAggregate",
    aggregateId,
    pageSize: 25,
    cancellationToken: cancellationToken
);

var export = await client.ExportAggregateEventsAsync("OrderAggregate", aggregateId);

Methods:

  • SearchAggregatesAsync(AggregateSearchRequest body)
  • GetAggregateAsync(string aggregateType, string aggregateId)
  • GetAggregateEventRangeAsync(string aggregateType, string aggregateId, ...)
  • GetAggregateProjectionAtVersionAsync(string aggregateType, string aggregateId, long? version)
  • GetAggregateProjectionAtTimeAsync(string aggregateType, string aggregateId, DateTimeOffset? asOfUtc)
  • ExportAggregateEventsAsync(string aggregateType, string aggregateId, ...) returning a FileResponse over the JSON Lines stream

Non-success responses throw AdminApiException.

Regenerating the client

The client is generated from the Admin API OpenAPI document. After changing the Admin API contracts or endpoints:

just admin-openapi-export   # regenerate OpenApi/admin.openapi.json
just admin-client-generate  # regenerate Generated/AdminApiClient.g.cs via NSwag

Both the OpenAPI document and the generated client are committed, so consumers get a deterministic, reviewable client.

Notes

  • Uses System.Text.Json (no Newtonsoft dependency).
  • The JsonElement DTO carries raw event/projection JSON in its AdditionalProperties dictionary.
  • When BaseUrl is left unset, the hosting application must resolve the origin (for example Purview.EventSourcing.Admin.Site does this via a delegating handler that reads the current HTTP request).

Documentation

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Purview.EventSourcing.Admin.Client:

Package Downloads
Purview.EventSourcing.Admin.Site

Ready-to-use Razor Pages admin dashboard for Purview EventSourcing Admin Portal. Provides web UI for aggregate search, event inspection, and point-in-time projection queries.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.0-prerelease.34 0 9/18/2026
2.0.0-prerelease.33 31 9/17/2026
2.0.0-prerelease.32 50 9/15/2026
2.0.0-prerelease.31 57 9/12/2026
2.0.0-prerelease.30 72 9/8/2026
2.0.0-prerelease.29 59 9/4/2026