Hoody Cron API
Section titled “Hoody Cron API”The Cron service provides health monitoring and self-describing API documentation endpoints. Use these endpoints to verify the service is running, inspect its runtime state, and retrieve its OpenAPI specification in JSON or YAML format.
Health
Section titled “Health”GET /health
Section titled “GET /health”Returns the current health status and runtime metadata of the Cron service, including its process ID, IP address, memory usage, and uptime information.
This endpoint takes no parameters.
curl https://api.hoody.com/cron/healthconst result = await client.cron.health.check();Service is healthy
{ "status": "ok", "service": "cron", "started": "2025-01-15T10:00:00.000Z", "pid": 12345, "ip": "10.0.0.5", "fds": 12, "built": "2025-01-14T08:30:00.000Z", "user_agent": "hoody-cron/1.0.0", "memory": { "rss": 52428800, "heap": 31457280 }}| Field | Type | Required | Description |
|---|---|---|---|
status | string | Yes | Health status of the service |
service | string | Yes | Name of the service |
started | string | Yes | ISO 8601 timestamp of when the service started |
pid | integer | Yes | Process ID of the running service |
ip | string | Yes | IP address of the service instance |
fds | integer | null | No | Number of open file descriptors |
built | string | null | No | Build timestamp of the service binary |
user_agent | string | null | No | User agent string of the service |
memory | object | null | No | Memory usage details (rss, heap in bytes) |
OpenAPI Specification
Section titled “OpenAPI Specification”GET /openapi.json
Section titled “GET /openapi.json”Returns the full OpenAPI specification for the Cron service as a JSON document. Use this to generate client libraries, validate requests, or explore the API schema programmatically.
This endpoint takes no parameters.
curl https://api.hoody.com/cron/openapi.jsonconst spec = await client.cron.system.getOpenApiJson();OpenAPI JSON
The response body is a complete OpenAPI 3.x specification object describing all Cron service endpoints.
{ "openapi": "3.0.3", "info": { "title": "Hoody Cron API", "version": "1.0.0" }, "paths": {}}GET /openapi.yaml
Section titled “GET /openapi.yaml”Returns the full OpenAPI specification for the Cron service as a YAML document. Useful for tooling that prefers YAML input or for direct import into API gateways.
This endpoint takes no parameters.
curl https://api.hoody.com/cron/openapi.yamlconst spec = await client.cron.system.getOpenApiYaml();OpenAPI YAML
The response body is a complete OpenAPI 3.x specification in YAML format.
openapi: 3.0.3info: title: Hoody Cron API version: 1.0.0paths: {}Render error
{ "code": "BACKEND_ERROR", "message": "Internal server error", "details": "Failed to render OpenAPI YAML specification"}| Error Code | Title | Description | Resolution |
|---|---|---|---|
BACKEND_ERROR | Backend error | Failed to read or write system crontab | Check crontab availability and permissions |