dev.edgebase.admin 0.2.9

dotnet add package dev.edgebase.admin --version 0.2.9
                    
NuGet\Install-Package dev.edgebase.admin -Version 0.2.9
                    
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="dev.edgebase.admin" Version="0.2.9" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="dev.edgebase.admin" Version="0.2.9" />
                    
Directory.Packages.props
<PackageReference Include="dev.edgebase.admin" />
                    
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 dev.edgebase.admin --version 0.2.9
                    
#r "nuget: dev.edgebase.admin, 0.2.9"
                    
#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 dev.edgebase.admin@0.2.9
                    
#: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=dev.edgebase.admin&version=0.2.9
                    
Install as a Cake Addin
#tool nuget:?package=dev.edgebase.admin&version=0.2.9
                    
Install as a Cake Tool

<p align="center"> <a href="https://github.com/edge-base/edgebase"> <img src="https://raw.githubusercontent.com/edge-base/edgebase/main/docs/static/img/logo-icon.svg" alt="EdgeBase Logo" width="72" /> </a> </p>

EdgeBase.Admin

Trusted server-side .NET SDK for EdgeBase.

Use EdgeBase.Admin from backend APIs, jobs, workers, and other trusted environments that hold a Service Key. It exposes admin auth, service-key database access, raw SQL, storage, push, functions, analytics, KV, D1, and Vectorize clients.

EdgeBase is the open-source edge-native BaaS that runs on Edge, Docker, and Node.js.

This package is one part of the wider EdgeBase platform. For the full platform, CLI, Admin Dashboard, server runtime, docs, and all public SDKs, see the main repository: edge-base/edgebase.

Documentation Map

Use this README for the fast overview, then jump into the docs when you need depth:

  • SDK Overview Install commands and language matrix for all public SDKs
  • Admin SDK Service-key concepts, trust boundaries, and admin-only capabilities
  • Admin SDK Reference Cross-language auth, database, storage, functions, push, and analytics examples
  • Admin User Management Create, update, delete, and manage users with the Service Key
  • Database Admin SDK Table queries, filters, pagination, batch writes, and raw SQL
  • Storage Uploads, downloads, metadata, and signed URLs
  • Push Admin SDK Push send, topic broadcast, token inspection, and logs
  • Analytics Admin SDK Request metrics, event tracking, and event queries
  • Native Resources KV, D1, Vectorize, and other edge-native resources

For AI Coding Assistants

This package includes an llms.txt file for AI-assisted development.

Use it when you want an agent or code assistant to:

  • keep Service Key logic on the server
  • use AdminAuth, not adminAuth
  • use the real C# SqlAsync(namespaceName, query, parameters?) signature
  • remember that namespaceName may encode an instance id as namespace:id
  • avoid copying JavaScript or Dart admin API shapes into C#

You can find it:

  • in this repository: llms.txt
  • in the packed NuGet artifact alongside the package contents

Installation

If you are working inside this repository, reference the project directly:

<ItemGroup>
  <ProjectReference Include="..\packages\sdk\csharp\packages\admin\EdgeBase.Admin.csproj" />
</ItemGroup>

The NuGet package id declared by the project is dev.edgebase.admin.

Quick Start

using EdgeBase.Admin;

var serviceKey = Environment.GetEnvironmentVariable("EDGEBASE_SERVICE_KEY")!;
using var admin = new AdminClient("https://your-project.edgebase.fun", serviceKey);

var users = await admin.AdminAuth.ListUsersAsync(limit: 20);
var created = await admin.AdminAuth.CreateUserAsync(
    "admin@example.com",
    "secure-pass-123",
    displayName: "June",
    role: "moderator"
);

var rows = await admin.SqlAsync("shared", "SELECT 1 AS ok");
await admin.BroadcastAsync("chat", "message", new { text = "hello" });

Console.WriteLine(users.Users.Count);
Console.WriteLine(created["id"]);
Console.WriteLine(rows.Count);

Core API

Once you create an admin client, these are the main surfaces you will use:

  • new AdminClient(url, serviceKey) Main server-side entry point
  • admin.AdminAuth Admin user management
  • admin.Storage Server-side storage access
  • admin.Push Send push notifications
  • admin.Functions Call app functions from trusted code
  • admin.Analytics Query analytics and track server-side events
  • admin.Db(namespace, instanceId?) Service-key database access
  • admin.SqlAsync(namespaceName, query, parameters?) Raw SQL execution
  • admin.BroadcastAsync(channel, eventName, payload?) Server-side database-live broadcast
  • admin.Kv(namespace), admin.D1(database), admin.Vector(index) Access platform resources from trusted code

Database Access

using EdgeBase.Admin;

using var admin = new AdminClient(baseUrl, serviceKey);

var posts = admin.Db("app").Table("posts");
var result = await posts.GetListAsync();

For instance databases, pass the instance id explicitly:

admin.Db("workspace", "ws-123");
admin.Db("user", "user-123");

For raw SQL, the namespace name can also encode an instance id:

var rows = await admin.SqlAsync("workspace:ws-123", "SELECT * FROM documents");

Read more: Database Admin SDK

Admin Auth

var created = await admin.AdminAuth.CreateUserAsync(
    "june@example.com",
    "secure-pass-123",
    displayName: "June"
);

await admin.AdminAuth.SetCustomClaimsAsync(
    created["id"]!.ToString()!,
    new Dictionary<string, object?> { ["role"] = "moderator" }
);

var usersPage = await admin.AdminAuth.ListUsersAsync(limit: 20);
Console.WriteLine(usersPage.Users.Count);

Read more: Admin User Management

Raw SQL

SqlAsync supports the C# signature that ships in the package:

await admin.SqlAsync("shared", "SELECT 1 AS ok");

await admin.SqlAsync(
    "workspace:ws-123",
    "SELECT * FROM documents WHERE status = ?",
    new object[] { "published" }
);

Push And Analytics

await admin.BroadcastAsync("announcements", "system:update", new { status = "deployed" });

var overview = await admin.Analytics.OverviewAsync(new Dictionary<string, string> { ["range"] = "7d" });
Console.WriteLine(overview);

Read more:

Native Resource Access

await admin.Kv("cache").SetAsync("homepage", "warm", ttl: 60);

var rows = await admin.D1("analytics").ExecAsync(
    "SELECT * FROM events WHERE type = ?",
    new object[] { "click" }
);

Console.WriteLine(rows.Count);

Choose The Right Package

Package Use it for
EdgeBase.Admin Trusted server-side code with Service Key access

License

MIT

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 netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen 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
0.2.9 96 4/8/2026
0.2.8 106 4/4/2026
0.2.7 100 3/29/2026
0.2.6 97 3/26/2026
0.2.4 95 3/24/2026
0.2.3 97 3/24/2026
0.2.2 95 3/23/2026
0.2.1 92 3/23/2026
0.2.0 94 3/22/2026
0.1.5 95 3/20/2026
0.1.4 96 3/19/2026