Checks the health status of the CyborgDB microservice to verify connectivity and service availability.
async getHealth(): Promise<object>

Returns

Promise<object>: A Promise that resolves to the health status response from the CyborgDB service. The exact structure depends on the server implementation but typically includes status information.

Exceptions

Example Usage

import { Client } from 'cyborgdb';

const client = new Client({ baseUrl: 'http://localhost:8000', apiKey: 'your-api-key' });

try {
    const health = await client.getHealth();
    console.log('Service health status:', health);
    // Typical output: { status: 'healthy', version: '1.2.3', uptime: 12345 }
} catch (error) {
    console.error('Health check failed:', error.message);
}

Response Fields

FieldTypeDescription
statusstringCurrent health status of the service (typically “healthy”)
api_versionstringVersion of the API interface (e.g., “v1”)
versionstringVersion of the CyborgDB application/service