Typed .NET client primitives for integrating with Passbolt APIs in a safe, testable, and DI-friendly way.
dotnet add package Passbolt.Apiusing Passbolt.Api;
var options = new PassboltClientOptions
{
Uri = new Uri("https://passbolt.example.com"),
Username = "user@example.com",
Password = "password",
PrivateKeyBlock = "-----BEGIN PGP PRIVATE KEY BLOCK-----\n..."
};
using var client = new PassboltClient(options);
// Get server status
var status = await client.Status.GetStatusAsync(CancellationToken.None);
Console.WriteLine($"Passbolt version: {status.Body?.Version}");
// List all resources
var resources = await client.Resources.GetAllAsync(CancellationToken.None);
foreach (var resource in resources.Body ?? [])
{
Console.WriteLine($"Resource: {resource.Name} (ID: {resource.Id})");
}For production code, pass a real cancellation token:
using var cts = new CancellationTokenSource(TimeSpan.FromSeconds(30));
var resources = await client.Resources.GetAllAsync(cts.Token);- Strongly-typed
PassboltClientfor intuitive API access - Refit-backed REST API interface for seamless HTTP endpoint mapping
- Built-in support for Passbolt's PGP authentication flow
- Async/await support throughout
- Dependency injection compatible design
- Built with
TreatWarningsAsErrors - Nullable reference types enabled
- XML documentation generated
- CI validates restore, build, test, and package output
- Status: Server status and healthcheck information
- Users: CRUD operations and listing for user management
- Groups: CRUD operations and listing for group management
- Resources: CRUD operations, listing, searching by name/URI, and resource sharing
- Folders: CRUD operations and listing for folder management
- Comments: Create, read, and delete comments on resources
- Permissions: Query and filter permissions by resource or user
- Roles: List available roles and retrieve role details
- Avatars: Retrieve user profile images
- Me: Access current authenticated user's profile information
- NuGet: https://www.nuget.org/packages/Passbolt.Api
- GitHub: https://github.com/panoramicdata/Passbolt.Api
- Issues: https://github.com/panoramicdata/Passbolt.Api/issues
MIT - see LICENSE.