UpdownDotnet 1.1.0

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

build and test

updown-dotnet

A simple Updown.io .NET Client

https://www.nuget.org/packages/UpdownDotnet

Don't currently utilize Updown.IO? Join here --> https://updown.io/r/WioVu

Notes

  • This client is a simple wrapper around the Updown.io API. It does not implement all the API endpoints.
  • The client uses the System.Text.Json namespace to serialize and deserialize JSON data.
  • The client is asynchronous and uses the HttpClient class to make HTTP requests to the Updown.io API.
  • The HttpClient is implemented per Micrsoft recommendations. In this case, a Singleton that is reused.
  • You may provide your own HttpClient instance if you want to manage the lifecycle of the HttpClient.
  • Manual tests are provided if you'd like to observe the client in action. You will need to provide your own API key.

State

Entity Implemented
Checks
Downtimes
Metrics
Nodes
Recipients
Status Pages
Pulse Monitoring

Usage

Example usage using Checks. Implementation across entities is similar. Though some entities may not support all methods.

Use manual tests for reference.

Get all checks

var client = UpdownClientFactory.Create("YOUR-API-KEY-HERE");
var checks = await client.Checks();

Get check by token

var client = UpdownClientFactory.Create("YOUR-API-KEY-HERE");
var check = await client.Check("EXISTING-CHECK-TOKEN");

Create a check

Example: Create a check for https://your-url-here.com

var client = UpdownClientFactory.Create("YOUR-API-KEY-HERE");
var parameters = new CheckParameters
{
    Url = "https://your-url-here.com",
};
var check = await client.CheckCreate(parameters);

Update a check

Example: Update the check period to 300 seconds

var client = UpdownClientFactory.Create("YOUR-API-KEY-HERE");
var updateParameters = new CheckParameters
{
    Period = 300
};
var update = await client.CheckUpdate("EXISTING-CHECK-TOKEN", updateParameters);

Delete a check

var client = UpdownClientFactory.Create("YOUR-API-KEY-HERE");
var delete = await client.CheckDelete("EXISTING-CHECK-TOKEN");

Pulse Monitoring (Cron/Background Job Monitoring)

Pulse monitoring is used to monitor cron jobs, background tasks, and scheduled processes. Unlike regular HTTP monitoring, pulse monitoring works by having your application send heartbeat signals TO Updown.io.

To use pulse monitoring:

  1. Create a pulse check in your Updown.io dashboard
  2. Updown.io will provide you with a unique pulse URL
  3. Your application/cron job should make HTTP requests TO that URL on schedule
  4. If Updown.io doesn't receive pulses within the expected timeframe, it will alert you

Example: Sending a pulse using the client library

var client = UpdownClientFactory.Create("YOUR-API-KEY-HERE");

// Send pulse using GET request (most common)
await client.SendPulse("https://pulse.updown.io/YOUR-TOKEN/YOUR-KEY");

// Send pulse using POST request (if needed)
await client.SendPulsePost("https://pulse.updown.io/YOUR-TOKEN/YOUR-KEY");

Example: Manual pulse (without using the client library)

// Simple pulse using HttpClient directly
using var httpClient = new HttpClient();
await httpClient.GetAsync("https://pulse.updown.io/YOUR-TOKEN/YOUR-KEY");

// Or using POST
await httpClient.PostAsync("https://pulse.updown.io/YOUR-TOKEN/YOUR-KEY", null);

Example: Pulse in a cron job or scheduled task

public async Task RunScheduledTask()
{
    var client = UpdownClientFactory.Create("YOUR-API-KEY-HERE");
    
    try
    {
        // Your actual work here
        await DoImportantWork();
        
        // Send success pulse when work completes successfully
        await client.SendPulse("https://pulse.updown.io/YOUR-TOKEN/YOUR-KEY");
    }
    catch (Exception ex)
    {
        // Handle error - Updown.io will detect missing pulse
        _logger.LogError(ex, "Scheduled task failed");
        // Don't send pulse on failure, so Updown.io alerts you
    }
}

Example: Pulse with error handling

public async Task SendHeartbeat(string pulseUrl)
{
    var client = UpdownClientFactory.Create("YOUR-API-KEY-HERE");
    
    try
    {
        await client.SendPulse(pulseUrl);
        _logger.LogInformation("Pulse sent successfully");
    }
    catch (HttpRequestException ex)
    {
        _logger.LogError(ex, "Failed to send pulse");
        // Handle pulse sending failure appropriately for your application
    }
}

For more information about pulse monitoring, see: https://updown.io/doc/how-pulse-cron-monitoring-works

Contributing

Use your favorite IDE to open the project. The project was developed using Visual Studio.

git clone https://github.com/strvmarv/updown-dotnet.git
cd updown-dotnet
dotnet restore
dotnet build

Run Tests

dotnet test
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  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 is compatible.  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 netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  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
1.1.0 95 7/29/2025
1.0.9 300 6/10/2025
1.0.8 120 1/22/2025
1.0.7 122 12/17/2024
1.0.6 122 11/18/2024
1.0.5 111 11/15/2024
1.0.4 119 11/8/2024
1.0.3 121 11/7/2024
1.0.1 114 11/7/2024
1.0.0 112 11/6/2024

pulse added