DM Web Services Health Endpoint Integration
This page documents usage patterns and examples for working with service health endpoints programmatically.
Overview
Endpoints such as /health and /health/<service> are used to assess current availability and status of core APIs.
Integrating with the Health Overview Endpoint
The /health/overview endpoint is designed to return a full list of all active REST and SOAP health check URLs based on the currently enabled service versions. It is best suited for automation and system integration, not human browsing.
๐ Endpoint
Returns a JSON array of URLs such as:
[
"https://webservices.nebulasuite.net/api/v1/rating/health",
"https://webservices.nebulasuite.net/health/soap/rating/v1",
...
]
โ Use Cases
- Monitoring tools (e.g., UptimeRobot, Pingdom, Datadog) can poll the endpoint list and monitor each URL for 200 OK
- CI/CD deployment verification can use it to check endpoint health after push-to-prod
- Reverse proxies or load balancers can integrate with one or more of the listed endpoints as health probes
- Scheduled task validation (e.g., PowerShell, cron jobs) can loop through and record service health over time
๐งช Example: PowerShell Health Sweep
$urls = Invoke-RestMethod https://webservices.nebulasuite.net/health/overview
foreach ($url in $urls) {
try {
$resp = Invoke-WebRequest $url -UseBasicParsing -TimeoutSec 5
Write-Host "$url โ OK"
} catch {
Write-Warning "$url โ FAILED"
}
}
๐งฐ Example: cURL (Shell Script)
#!/bin/bash
urls=$(curl -s https://webservices.nebulasuite.net/health/overview | jq -r '.[]')
for url in $urls; do
http_status=$(curl -s -o /dev/null -w "%{http_code}" $url)
echo "$url โ $http_status"
done
๐งฉ Example: Integration into Datadog Synthetic Checks
- Create a new Synthetic Test (multi-step API monitor)
- Step 1: GET
/health/overview, parse the JSON - Step 2+: Loop over parsed URLs and validate HTTP 200 OK
๐ Notes
- The overview endpoint itself does not perform health checks, it lists all URLs configured based on active versions
- If you disable a service version in
appsettings.json, those URLs will be omitted - The list can be parsed as JSON in any language (JavaScript, Python, C#, Bash, etc.)
๐ป Example: C# (HttpClient)
using System.Net.Http.Json;
var client = new HttpClient();
var urls = await client.GetFromJsonAsync<List<string>>("https://webservices.nebulasuite.net/health/overview");
foreach (var url in urls)
{
try
{
var result = await client.GetAsync(url);
Console.WriteLine($"{url} โ {(result.IsSuccessStatusCode ? "OK" : "FAIL")}");
}
catch (Exception ex)
{
Console.WriteLine($"{url} โ ERROR: {ex.Message}");
}
}
๐ Example: Python (requests)
import requests
response = requests.get("https://webservices.nebulasuite.net/health/overview")
urls = response.json()
for url in urls:
try:
resp = requests.get(url, timeout=5)
print(f"{url} โ {resp.status_code}")
except Exception as e:
print(f"{url} โ ERROR: {str(e)}")
๐ Example: Monitoring with Swagger-compatible Tools
While Swagger itself does not probe health endpoints, you can integrate these health checks into test suites that use OpenAPI clients (e.g., Postman or Swagger-based runners):
- Import the health URLs from
/health/overview - Set up each as a GET request in your collection
- Add tests that expect HTTP 200 response status
- Schedule the collection to run regularly
๐ Example: Shell Script (Bash)
#!/bin/bash
urls=$(curl -s https://webservices.nebulasuite.net/health/overview | jq -r '.[]')
for url in $urls; do
code=$(curl -s -o /dev/null -w "%{http_code}" $url)
if [ "$code" -eq 200 ]; then
echo "$url โ OK"
else
echo "$url โ ERROR ($code)"
fi
done
โ๏ธ Example: Power Automate
- Create a new Scheduled Cloud Flow in Power Automate
- Add an HTTP action to GET https://webservices.nebulasuite.net/health/overview
- Add a Parse JSON step to parse the list of URLs
- Use a For Each loop to iterate over the parsed results
- Inside the loop, use an HTTP action to call each health URL and check the status code
- Log or notify on any failures (e.g., via Teams, email, or logging endpoint)
This allows Microsoft environments to check health without writing code, directly in the cloud.