Skip to content

Latest commit

 

History

History
69 lines (45 loc) · 1.96 KB

File metadata and controls

69 lines (45 loc) · 1.96 KB

Interserver\Mailbaby\StatusApi

Service health / uptime checks.

All URIs are relative to https://api.mailbaby.net, except if the operation defines another base path.

Method HTTP request Description
pingServer() GET /ping Checks if the server is running

pingServer()

pingServer(): string

Checks if the server is running

A lightweight health-check endpoint. Returns the plain-text string Server is up and running with a 200 status when the API server is reachable. No authentication is required. Useful for uptime monitoring, load-balancer health checks, and smoke tests.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: apiKeyAuth
$config = Interserver\Mailbaby\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Interserver\Mailbaby\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer');


$apiInstance = new Interserver\Mailbaby\Api\StatusApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);

try {
    $result = $apiInstance->pingServer();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling StatusApi->pingServer: ', $e->getMessage(), PHP_EOL;
}

Parameters

This endpoint does not need any parameter.

Return type

string

Authorization

apiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain, application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]