SDKs

C# SDK

Official .NET client for the MUDBASE API (NuGet).

Installation

bash
dotnet add package Mudbase.SDK
dotnet add package Mudbase.SDK

Quick Start

Construct a Configuration plus the API classes you need - there is no unified client wrapper and no dependency-injection setup required. Log in first and use the returned JWT as a bearer token; project API keys are not wired into this generated client's request headers yet.

csharp
using Mudbase.SDK.Api;
using Mudbase.SDK.Client;
using Mudbase.SDK.Model;

var config = new Configuration {
    BasePath = "https://cloud.mudbase.dev",
};

var auth = new AuthenticationApi(config);

// Log in an end-user of your project
var session = await auth.LoginUserAsync(new LoginRequest(email: "morgan.chen@northwind.dev", password: "hunter2"));

// Use the returned JWT for subsequent authenticated calls
config.AccessToken = session.Token;

var data = new DataApi(config);

// List documents in a collection
var items = await data.ListDataAsync(projectId, collectionId);
using Mudbase.SDK.Api;
using Mudbase.SDK.Client;
using Mudbase.SDK.Model;

var config = new Configuration {
    BasePath = "https://cloud.mudbase.dev",
};

var auth = new AuthenticationApi(config);

// Log in an end-user of your project
var session = await auth.LoginUserAsync(new LoginRequest(email: "morgan.chen@northwind.dev", password: "hunter2"));

// Use the returned JWT for subsequent authenticated calls
config.AccessToken = session.Token;

var data = new DataApi(config);

// List documents in a collection
var items = await data.ListDataAsync(projectId, collectionId);

More

For error handling, pagination, and other languages, see the SDKs Overview.

Chat with us