Grote.Daas.Client
1.0.2
dotnet add package Grote.Daas.Client --version 1.0.2
NuGet\Install-Package Grote.Daas.Client -Version 1.0.2
<PackageReference Include="Grote.Daas.Client" Version="1.0.2" />
<PackageVersion Include="Grote.Daas.Client" Version="1.0.2" />
<PackageReference Include="Grote.Daas.Client" />
paket add Grote.Daas.Client --version 1.0.2
#r "nuget: Grote.Daas.Client, 1.0.2"
#:package Grote.Daas.Client@1.0.2
#addin nuget:?package=Grote.Daas.Client&version=1.0.2
#tool nuget:?package=Grote.Daas.Client&version=1.0.2
Grote.Daas.Client
Official C# client for the 4SEE Integrations Data-as-a-Service (DaaS) API.
It handles API-key authentication against the Grote auth server, caches and refreshes the JWT for you, follows cursor pagination automatically, and gives you strongly-typed access to fleets, trailers, devices, and DeliverSafe data.
Install
dotnet add package Grote.Daas.Client
Authentication
Authentication is a two-step system. You hold a long-lived API key; the SDK exchanges it for
a short-lived JWT against auth.groteintegrations.com, then calls the data API at
4see.groteintegrations.com with that token. The token is cached and refreshed automatically, so
you never manage it yourself.
Provide your API key via the DAAS_API_KEY environment variable, a constructor option, or DI.
Set Audience to match your key: Customer (default) for a fleet-owner key, or Partner
for an integration-partner key. The wrong audience fails authentication against the auth server.
Quick start
using Grote.Daas.Client;
using var client = new DaasClient(new DaasClientOptions
{
ApiKey = Environment.GetEnvironmentVariable("DAAS_API_KEY")!
});
// Get one fleet
var fleet = await client.Fleets.GetAsync(1234);
// Page through trailers manually
var page = await client.Trailers.ListAsync(fleet: 1234, take: 50);
Console.WriteLine($"{page.Count} trailers, more: {page.HasMore}");
// Or stream every trailer, following pagination automatically
await foreach (var trailer in client.Trailers.StreamAsync(fleet: 1234, status: TrailerStatusFilter.Fault))
Console.WriteLine($"{trailer.UnitId}: {trailer.Status?.Name}");
Dependency injection
using Grote.Daas.Client;
// Uses DAAS_API_KEY, or pass the key / a configure action.
builder.Services.AddDaas();
// Then inject IDaasClient anywhere:
public class MyService(IDaasClient daas)
{
public Task<Fleet> GetFleet(int id) => daas.Fleets.GetAsync(id);
}
The DI registration wires the client through IHttpClientFactory and keeps the auth handler as a
singleton so the cached JWT is shared across requests.
Surface
| Group | Methods |
|---|---|
client.Fleets |
ListAsync, StreamAsync, GetAsync |
client.Trailers |
ListAsync, StreamAsync, GetAsync, ListGpsAsync, StreamGpsAsync |
client.Devices |
ListAsync, StreamAsync, GetDetailsAsync, ListTelemetryAsync, StreamTelemetryAsync |
client.DeliverSafe |
ListAsync, StreamAsync, GetAsync, ListTelemetryAsync, StreamTelemetryAsync |
Every list/telemetry endpoint comes in two forms: a List*/Get* method that returns one
OffsetResponse<T> page (with a NextCursor you can pass back), and a Stream* method that
returns an IAsyncEnumerable<T> and walks every page for you.
Errors
All failures throw a DaasException subclass carrying the HTTP status and parsed
ProblemDetails when available:
| Exception | HTTP |
|---|---|
DaasAuthorizationException |
401, 403 (authenticated, but the call was denied) |
DaasNotFoundException |
404 |
DaasValidationException |
400, 422 (exposes per-field Errors) |
DaasRateLimitException |
429 |
DaasServerException |
500 |
DaasAuthenticationException |
could not obtain a token from the auth server (bad key/audience) |
Note: the 4SEE API returns a bare
429with noRetry-Afterheader; the SDK backs off on its own (see Retries).
Note: a get-by-id returns 404 (→
DaasNotFoundException) when the resource doesn't exist or belongs to a fleet you can't access — the two are intentionally indistinguishable so resource existence isn't leaked across fleets.
Retries & resilience
The client retries transient failures (429, 502, 503, 504, and network errors) on
idempotent GETs, with bounded exponential backoff and jitter. It's on by default and tunable:
builder.Services.AddDaas(o =>
{
o.ApiKey = apiKey;
o.Retry.MaxRetries = 3; // default
o.Retry.BaseDelay = TimeSpan.FromMilliseconds(500);
o.Retry.MaxDelay = TimeSpan.FromSeconds(10);
// o.Retry.Enabled = false; // to fully own resilience yourself
});
Bring your own Polly. The DI overload takes a configureHttp hook exposing the
IHttpClientBuilder, so you can attach a resilience pipeline, logging, metrics, or any handler:
builder.Services.AddDaas(
o => { o.ApiKey = apiKey; o.Retry.Enabled = false; },
http => http.AddResilienceHandler("daas", b => b
.AddRetry(new HttpRetryStrategyOptions { MaxRetryAttempts = 5 })
.AddTimeout(TimeSpan.FromSeconds(10))));
Handlers you add run closest to the network, inside the SDK's built-in auth (and retry, if left on).
Configuration
DaasClientOptions:
| Option | Default |
|---|---|
ApiKey |
DAAS_API_KEY env var |
BaseUrl |
https://4see.groteintegrations.com/ |
AuthUrl |
https://auth.groteintegrations.com/ |
Audience |
Customer (or Partner) |
Timeout |
30 seconds |
Retry |
enabled; 3 retries, 500ms base, 10s cap (see above) |
PrimaryHandlerFactory |
none (supply for proxy / custom handler / tests, standalone ctor) |
Every request also carries a User-Agent of Grote.Daas.Client/<version>.
| Product | Versions 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. |
-
net10.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.11)
- Microsoft.Extensions.Http (>= 10.0.11)
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 |
|---|---|---|
| 1.0.2 | 116 | 8/18/2026 |