Ekso.Sdk 2.2.0

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

Ekso.Sdk

NuGet

Official C# SDK for the Ekso API. Auto-generated from the Ekso OpenAPI spec via Kiota, with thin hand-polish on top for auth, pagination, batch, and typed errors.

Pairs with Ekso.Cli — a dotnet tool that wraps every method this SDK exposes.

Install

dotnet add package Ekso.Sdk

Quick start

using Ekso.Sdk;

var client = new EksoClient(new EksoClientOptions {
    Tenant = "acme",
    Auth = new ApiKeyAuth(Environment.GetEnvironmentVariable("EKSO_API_KEY")!),
});

// Generated URL-driven surface:
var clocks = await client.Api.Clock.GetAsync();
var clock  = await client.Api.Clock["clock-123"].GetAsync();
var items  = await client.Api.Item.GetAsync();

The client surface mirrors the URL hierarchy: /api/{resource}/{id}/{sub} becomes client.Api.Resource[id].Sub.MethodAsync(). Method names follow HTTP verb convention (GetAsync, PostAsync, PutAsync, PatchAsync, DeleteAsync).

Auth strategies

API key — for agents, CI, headless services

var client = new EksoClient(new EksoClientOptions {
    Tenant = "acme",
    Auth = new ApiKeyAuth(Environment.GetEnvironmentVariable("EKSO_API_KEY")!),
});

A super-admin in your tenant mints keys via POST /api/admin/api-key. The raw key is returned exactly once at issuance — capture it immediately. The server only keeps a SHA-256 hash; there is no recovery path if you lose it.

OAuth device flow — for CLIs and human-attended servers

using Ekso.Sdk;

var client = await EksoClient.LoginDeviceAsync(
    tenant: "acme",
    clientId: "ekso-cli",
    onPrompt: prompt =>
    {
        Console.WriteLine($"Open {prompt.VerificationUriComplete}");
        Console.WriteLine($"Or enter code: {prompt.UserCode} at {prompt.VerificationUri}");
    });

// User signs in on the browser; the SDK polls until approved, then returns.
var clocks = await client.Api.Clock.GetAsync();

Tokens refresh transparently on 401 — the SDK silently swaps the access token using the stored refresh token and retries the original request. Hook the TokensRefreshed event on the auth strategy to persist rotated tokens between sessions:

var auth = new RefreshableBearerAuth(savedAccess, savedRefresh, tokenEndpoint, clientId);
auth.TokensRefreshed += (_, e) => SaveTokens(e.AccessToken, e.RefreshToken, e.ExpiresAt);
var client = new EksoClient(new EksoClientOptions { Tenant = "acme", Auth = auth });

OAuth PKCE — for .NET desktop / Blazor clients hosting their own redirect

var pkce = EksoClient.BuildPkceAuthorizeUri(
    tenant: "acme",
    clientId: "my-app",
    redirectUri: new Uri("http://localhost:5000/callback"));

// Open pkce.AuthorizeUri in a browser, capture the `code` returned to your callback...
var client = await EksoClient.ExchangePkceCodeAsync(
    tenant: "acme",
    clientId: "my-app",
    redirectUri: new Uri("http://localhost:5000/callback"),
    code: receivedCode,
    codeVerifier: pkce.CodeVerifier);

The SDK does not open browsers or run redirect listeners — those are caller concerns. We provide the OAuth primitives.

Pagination

using Ekso.Sdk.Pagination;

await foreach (var item in PagedAsyncEnumerable.Create<DataItem>(
    (page, ct) => FetchItemPage(client, page, ct)))
{
    Process(item);
}

Lazy by default — the first network call is deferred until the consumer reads the first item. Cancellation is honoured between pages and items, so cancelling mid-stream releases the connection promptly.

Parallel batching

using Ekso.Sdk.Batch;

var batch = await client.BatchAsync<int>(
[
    (c, ct) => c.Api.Clock.GetAsync(cancellationToken: ct).ContinueWith(t => t.Result.Count),
    (c, ct) => c.Api.Item.GetAsync(cancellationToken: ct).ContinueWith(t => t.Result.Items.Count),
]);

if (batch.AllSucceeded) { /* ... */ }
foreach (var error in batch.Errors) { /* ... */ }

Per-op error capture means a single failure doesn't tank the whole batch.

Typed exceptions

Catch the SDK's exception hierarchy for structured error handling:

try
{
    await client.Api.Item.PostAsync(cmd);
}
catch (EksoRateLimitException ex)
{
    await Task.Delay(ex.RetryAfter);
    // retry...
}
catch (EksoAuthException ex) when (ex.Reason == AuthFailureReason.Expired)
{
    // refresh token expired — rerun LoginDeviceAsync / LoginPkceAsync
}
catch (EksoNetworkException ex)
{
    // transient — retry with backoff
}

Available subclasses: EksoApiException, EksoAuthException, EksoRateLimitException, EksoValidationException, EksoNetworkException — all inherit from EksoException.

License

MIT.

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.2.0 106 5/10/2026
2.1.0 104 5/9/2026
2.0.0 105 5/7/2026
1.2.1 90 4/30/2026
1.2.0 93 4/30/2026
1.1.0 114 4/29/2026
1.0.0 116 4/28/2026
0.5.0 103 4/27/2026
0.3.0 101 4/27/2026
0.2.0-preview 94 4/27/2026