Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Integration Service

HealthCheckClient

  • Last UpdatedJul 27, 2026
  • 1 minute read

Namespace: AVEVA.IntegrationService.DataAPI.SDK.ApiClient

Interface: IHealthCheckClient

Description: HealthCheckClient is used to verify the health status of the API without requiring authorization.

Methods

HealthCheckAPI

Verifies the health of the API.

Signature:

Task<HttpStatusCode> HealthCheckAPI(string apiBaseUrl)

Example:

using AVEVA.IntegrationService.DataAPI.SDK.ApiClient;

using System.Net;

// Create health check client

var httpClient = new HttpClient();

var healthCheckClient = new HealthCheckClient(httpClient);

// Check API health

HttpStatusCode status = await healthCheckClient.HealthCheckAPI(

"https://api.mycompany.com/integration/v1"

);

if (status == HttpStatusCode.OK)

{

Console.WriteLine("API is healthy and responsive");

}

else

{

Console.WriteLine($"API health check failed with status: {status}");

}

// With cancellation token

CancellationTokenSource cts = new CancellationTokenSource(TimeSpan.FromSeconds(30));

var healthCheckClient2 = new HealthCheckClient(httpClient, cts.Token);

try

{

HttpStatusCode status2 = await healthCheckClient2.HealthCheckAPI(

"https://api.mycompany.com/integration/v1"

);

Console.WriteLine($"Health check status: {status2}");

}

catch (OperationCanceledException)

{

Console.WriteLine("Health check timed out");

}

Related Links