Skip to main content
GET
/
v1
/
database
/
health
JavaScript
import BlueHive from '@bluehive/sdk';

const client = new BlueHive({
  apiKey: 'My API Key',
});

const response = await client.database.checkHealth();

console.log(response.status);
{
  "status": "ok",
  "database": "<string>",
  "timestamp": "<string>",
  "stats": {
    "collections": 123,
    "documents": 123,
    "dataSize": 123
  },
  "error": "<string>"
}

Authorizations

Authorization
string
header
required

API key for accessing BlueHive API endpoints. Format: "ApiKey <your-api-key>" or "Bearer <your-api-key>"

Response

Default Response

status
enum<string>
required

Database health status

Available options:
ok,
error
timestamp
string
required

Health check timestamp

database
string

Database name (hidden in production)

stats
object

Database statistics (not available in production)

error
string

Error message if status is error

I