XENBIT.ResQueServe.SDK.Client 9.0.0

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

XENBIT.ResQueServe.SDK

The official .NET SDK for integrating with the ResQueServe platform. This library provides strongly-typed, fully tested REST clients for the Dashboard API, handling authentication, serialization, and error mapping automatically.

Features

  • Dependency Injection First: Designed for Microsoft.Extensions.DependencyInjection and ASP.NET Core.
  • Smart Error Handling: Automatically maps RFC 7807 API errors to strongly-typed C# exceptions (ValidationException, DataNotFoundException, etc.).
  • Polymorphic Serialization: Handles complex data structures like ShelfOrigin and KeywordEquipment out of the box.
  • Full Coverage: Includes clients for Units, POIs, Keywords, Radio Groups, and Address Lookups.

Installation

Install the package via NuGet:

dotnet add package XENBIT.ResQueServe.SDK.Client

Getting Started

1. Dependency Injection Registration

Register the SDK in your Program.cs or Startup.cs. You can configure it using appsettings.json, a delegate, or raw parameters.

Option A: Using AppSettings (Recommended)

// appsettings.json
{
  "ResQueServe": {
    "BaseUrl": "https://www.sim-dispatcher.com",
    "JwtToken": "YOUR_SECURE_TOKEN",
    "TimeoutSeconds": 60
  }
}

using XENBIT.ResQueServe.SDK.Client.Extensions;

var builder = Host.CreateApplicationBuilder(args);

// Automatically binds to the "ResQueServe" configuration section
builder.Services.AddResQueServeDashboardClient(builder.Configuration, sectionName: "ResQueServe");

Option B: Fluent Configuration

using XENBIT.ResQueServe.SDK.Client.Extensions;
using XENBIT.ResQueServe.SDK.Shared.Defaults;

builder.Services.AddResQueServeDashboardClient(options => 
{
    options.BaseUrl = BaseUrlDefaults.SIMDispatcherDashboard;
    options.JwtToken = Environment.GetEnvironmentVariable("RESQUESERVE_TOKEN");
    options.TimeoutSeconds = 30;
});

2. Injecting Clients

The clients are registered with a Scoped lifetime. You can inject them directly into your services or controllers.

Available Clients:

  • SystemClient - Health checks and version info.
  • PoiClient - Manage Points of Interest.
  • UnitClient - Manage Vehicles and Responders.
  • KeywordClient - Manage Dispatch Logic.
  • RadioGroupClient - Manage Communication Groups.
  • LookupClient - Resolve Addresses and Geodata.
public class FleetManager
{
    private readonly UnitClient _unitClient;
    private readonly PoiClient _poiClient;

    public FleetManager(UnitClient unitClient, PoiClient poiClient)
    {
        _unitClient = unitClient;
        _poiClient = poiClient;
    }

    public async Task InitializeFleetAsync(long dpcId)
    {
        var stations = await _poiClient.GetAllAsync(dpcId, search: "FindBy('isStation', 'true')");
        // ...
    }
}

Usage Examples

searching for Addresses

Use the LookupClient to resolve text to a structured Address ID. Note: The Dispatch Center must have an Address Package configured in the admin settings.

public async Task<long?> FindAddressId(LookupClient client, long dpcId, string query)
{
    // Search for "Main St" inside the Dispatch Center's area
    var results = await client.SearchAddressesAsync(dpcId, query, isInArea: true);
    
    return results?.FirstOrDefault()?.Id;
}

Creating a Unit

When creating resources, ensure you use the interfaces from XENBIT.ResQueServe.Abstractions.

using XENBIT.ResQueServe.Core.Models;
using XENBIT.ResQueServe.Abstractions.DataStructures;

public async Task CreateAmbulance(UnitClient client, long dpcId, long stationPoiId)
{
    var newUnit = new Unit
    {
        Callsign = "Rescue 1-83-1",
        CallsignShort = "1-83-1",
        Category = UnitCategory.Ambulance,
        Poi = new Poi { Id = stationPoiId }, // Link to Home Station
        DutyOptions = UnitDutyOptions.Always
    };

    var result = await client.CreateAsync(dpcId, newUnit);
    Console.WriteLine($"Created Unit: {result.Id}");
}

Error Handling

The SDK throws specific exceptions derived from ResQueServeException when the API returns an error.

try
{
    await _unitClient.CreateAsync(dpcId, unit);
}
catch (ValidationException ex)
{
    // Check specific error codes using the ProblemInformation Enum
    if (ex.Problems.Contains(ProblemInformation.CallsignAlreadyExists))
    {
        Console.WriteLine("Duplicate Callsign error.");
    }
}
catch (DataNotFoundException ex)
{
    Console.WriteLine($"Resource not found: {ex.LookupProperty} = {ex.ProvidedValue}");
}
catch (ResQueServeException ex)
{
    // General platform error
    // Log the TraceIdentifier for support!
    logger.LogError(ex, "API Error");
}

Advanced: Shelf Origin

Use the ShelfOrigin property to link entities to external data sources (e.g., OpenStreetMap or internal databases).

unit.Origin = new ShelfOrigin<string>(
    Namespace: "Internal_HR_System",
    Id: "HR_ID_9921",
    Version: new ShelfVersion<string>("v1.0")
);

License

Proprietary / Commercial. Copyright © 2026 XENBIT. All rights reserved.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  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. 
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
9.0.0 206 1/22/2026
9.0.0-rc.3 104 1/22/2026
9.0.0-rc.2 97 1/19/2026
9.0.0-rc.1 97 1/19/2026