MaksIT.CR.Client 2.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package MaksIT.CR.Client --version 2.0.0
                    
NuGet\Install-Package MaksIT.CR.Client -Version 2.0.0
                    
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="MaksIT.CR.Client" Version="2.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MaksIT.CR.Client" Version="2.0.0" />
                    
Directory.Packages.props
<PackageReference Include="MaksIT.CR.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 MaksIT.CR.Client --version 2.0.0
                    
#r "nuget: MaksIT.CR.Client, 2.0.0"
                    
#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 MaksIT.CR.Client@2.0.0
                    
#: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=MaksIT.CR.Client&version=2.0.0
                    
Install as a Cake Addin
#tool nuget:?package=MaksIT.CR.Client&version=2.0.0
                    
Install as a Cake Tool

MaksIT.CR.Client

HTTP client for the MAKS-IT CR API.

  • CR routes (api/cr/*, registry): JWT Bearer via AccessToken, or HTTP Basic (Username / Password) for service users.
  • Identity (api/identity/*): JWT Bearer via AccessToken (set manually or after LoginAsync / RefreshTokenAsync).

Shared wire types (MaksIT.CR.Contracts) are bundled in this NuGet package.

Features

  • ICRClient / CRClient for organizations, applications, catalog images/charts, registry, and identity.
  • DI registration via AddCRClient (Microsoft.Extensions.Http).
  • CRApiException when the API returns a non-success status code.

Installation

dotnet add package MaksIT.CR.Client

Target Framework

  • .NET 10 (net10.0)

Quick Start

Dependency injection (JWT or Basic)

using MaksIT.CR.Client;
using MaksIT.CR.Contracts.CR.Organization.Search;

builder.Services.AddCRClient(opts => {
  opts.BaseAddress = "https://cr.example.com";
  opts.Username = "admin";
  opts.Password = "...";
  // or: opts.AccessToken = "<jwt>";
});

public sealed class MyService(ICRClient client) {
  public Task DoWorkAsync(CancellationToken ct) =>
    client.SearchOrganizationsAsync(new SearchOrganizationRequest { PageNumber = 1, PageSize = 20 }, ct);
}

JWT (identity)

var login = await client.LoginAsync(new LoginRequest { Username = "admin", Password = "..." });
// client.AccessToken is set automatically

var users = await client.SearchUsersAsync(new SearchUserRequest { PageNumber = 1, PageSize = 20 });

Or pass AccessToken in CRClientOptions / Connect-CR -AccessToken.

Use the reverse-proxy origin when CR is deployed behind YARP or ingress (e.g. http://localhost:8080), not the internal server port.

Manual construction

var httpClient = new HttpClient();
var client = new CRClient(httpClient, "https://cr.example.com", username: "admin", password: "...", accessToken: null);

Contract namespaces

Area Namespace example
Organizations MaksIT.CR.Contracts.CR.Organization
Applications MaksIT.CR.Contracts.CR.Application
Images (catalog) MaksIT.CR.Contracts.CR.Image
Charts (catalog) MaksIT.CR.Contracts.CR.Chart
Users MaksIT.CR.Contracts.Identity.User
Shared enums MaksIT.CR.Contracts.Shared
Paging MaksIT.Core.Webapi.Models.PagedRequest / PagedResponse<T>

Patch DTOs use PatchRequestModelBase with Operations: Dictionary<string, PatchOperation> from MaksIT.Core.Webapi.Models.

API surface

Area Methods
Organizations SearchOrganizationsAsync, GetOrganizationAsync, CreateOrganizationAsync, PatchOrganizationAsync, DeleteOrganizationAsync
Applications SearchApplicationsAsync, GetApplicationAsync, CreateApplicationAsync, PatchApplicationAsync, DeleteApplicationAsync
Images (catalog) SearchImagesAsync, GetImageAsync, CreateImageAsync, PatchImageAsync, DeleteImageAsync
Charts (catalog) SearchChartsAsync, GetChartAsync, CreateChartAsync, PatchChartAsync, DeleteChartAsync
Registry GlobalSearchAsync, BrowseChartsAsync, ListTagsAsync, ListChartVersionsAsync, GetImageAsync, ListCvesAsync, DeleteManifestAsync, …
Identity SearchUsersAsync, SearchUserEntityScopesAsync, GetUserAsync, CreateUserAsync, PatchUserAsync, DeleteUserAsync, LoginAsync, RefreshTokenAsync, LogoutAsync

Catalog chart names are short (demo-app). Helm OCI URLs use the fixed prefix: helm push … oci://host/chartsoci://host/charts/demo-app. Images stay flat (docker push host/api). The same short name may be used for an Image and a Chart; charts is reserved.

PowerShell

See MaksIT.CR.Client.PowerShell (Connect-CR and cmdlets for CR and identity).

Contributing

See CONTRIBUTING.md.

License

See LICENSE.md.

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

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
2.3.3 33 8/4/2026
2.3.2 44 8/4/2026
2.3.1 32 8/4/2026
2.3.0 45 8/3/2026
2.2.1 44 8/3/2026
2.2.0 49 8/1/2026
2.0.0 95 7/28/2026
1.2.2 87 7/28/2026
1.2.1 84 7/28/2026
1.2.0 89 7/27/2026
1.1.0 91 7/25/2026
1.0.0 93 7/19/2026