A .NET API for Datadog
To run unit tests, set up your unit test User secrets to match the usersecrets.example.json file.
using Datadog.Api;
var client = new DatadogClient(new()
{
ApiKey = "API_KEY",
ApplicationKey = "APPLICATION_KEY"
});
var users = await client.Users.GetAllAsync();Endpoints that accept query filters take a request object:
var metrics = await client.Metrics.GetMetricsAsync(
new GetMetricsRequest
{
FilterConfigured = true,
FilterMetricType = MetricType.Gauge,
WindowSeconds = 3600
},
cancellationToken);The older overloads that took each filter as an optional parameter are obsolete and will be removed in 3.0. They produce identical requests, so migration is mechanical.