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
- 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.
Entity | Implemented |
---|---|
Checks | ✅ |
Downtimes | ❌ |
Metrics | ❌ |
Nodes | ❌ |
Recipients | ✅ |
Status Pages | ✅ |
Example usage using Checks. Implementation across entities is similar. Though some entities may not support all methods.
Use manual tests for reference.
var client = UpdownClientFactory.Create("YOUR-API-KEY-HERE");
var checks = await client.Checks();
var client = UpdownClientFactory.Create("YOUR-API-KEY-HERE");
var check = await client.Check("EXISTING-CHECK-TOKEN");
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);
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);
var client = UpdownClientFactory.Create("YOUR-API-KEY-HERE");
var delete = await client.CheckDelete("EXISTING-CHECK-TOKEN");
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
dotnet test