DM Web Services Documentation

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.

DM Web Services Health Endpoint Integration

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

GET /health/overview

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

๐Ÿงช 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

  1. Create a new Synthetic Test (multi-step API monitor)
  2. Step 1: GET /health/overview, parse the JSON
  3. Step 2+: Loop over parsed URLs and validate HTTP 200 OK

๐Ÿ“Ž Notes

๐Ÿ’ป 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):

  1. Import the health URLs from /health/overview
  2. Set up each as a GET request in your collection
  3. Add tests that expect HTTP 200 response status
  4. 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

  1. Create a new Scheduled Cloud Flow in Power Automate
  2. Add an HTTP action to GET https://webservices.nebulasuite.net/health/overview
  3. Add a Parse JSON step to parse the list of URLs
  4. Use a For Each loop to iterate over the parsed results
  5. Inside the loop, use an HTTP action to call each health URL and check the status code
  6. 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.