Server Management API
Section titled “Server Management API”The Server Management API exposes utilities for inspecting the caller’s IP environment, reading cached platform-wide social counters, and executing or enumerating commands on rented servers. Use these endpoints to discover which commands are available on a given server, execute them synchronously or asynchronously, and surface platform-level metrics to end users.
Utilities
Section titled “Utilities”GET /api/v1/ip
Section titled “GET /api/v1/ip”Retrieves information about the caller’s IP address, including geolocation and network details.
This endpoint takes no parameters.
curl -X GET https://api.hoody.com/api/v1/ipconst info = await client.api.utilities.getIpInfo();{ "statusCode": 200, "message": "IP information retrieved successfully", "data": { "ip": "8.8.8.8", "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36", "headers": { "accept-language": "en-US,en;q=0.9" }, "referer": "https://hoody.com/dashboard", "timestamp": "2025-01-15T16:00:00.000Z", "is_logged": true, "protocol": "https", "ip_info": { "ip": "8.8.8.8", "hostname": "dns.google", "city": "Mountain View", "region": "California", "country": "US", "loc": "37.4056,-122.0775", "postal": "94043", "timezone": "America/Los_Angeles", "asn": { "asn": "AS15169", "name": "Google LLC", "domain": "google.com", "route": "8.8.8.0/24", "type": "hosting" }, "is_anycast": true, "is_mobile": false, "is_anonymous": false, "is_satellite": false, "is_hosting": true } }}GET /api/v1/meta/social-stats
Section titled “GET /api/v1/meta/social-stats”Returns cached counters for the public Hoody social channels: GitHub stars, Telegram members, Discord members (total + currently online), X followers, and LinkedIn followers.
Values are persisted to disk (auto.json) and refreshed in the background (default every 10 minutes), so the endpoint is cheap, has no upstream rate-limit risk, and survives process restarts even when upstreams are unreachable. A separate overrides.json file lets operators pin any field to a manually chosen value (per-field; the refresher never touches that file).
A field is null only when no value has ever been persisted for it (e.g. first boot before the first successful refresh). Once populated it stays populated until manually cleared.
No authentication is required.
This endpoint takes no parameters.
curl -X GET https://api.hoody.com/api/v1/meta/social-statsconst stats = await client.api.meta.getSocialStats();{ "statusCode": 200, "message": "Hoody social counters", "data": { "github": 1284, "telegram": 5721, "discord": 943, "discord_online": 57, "x": 851, "linkedin": 562, "fetchedAt": "2025-01-15T16:00:00.000Z" }}Server Commands
Section titled “Server Commands”GET /api/v1/servers/{serverId}/available-commands
Section titled “GET /api/v1/servers/{serverId}/available-commands”Returns the list of commands available for execution on a given server, optionally filtered by category and maximum acceptable risk level.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
serverId | path | string | Yes | Server ID to get available commands for |
category | query | string | No | Filter by command category |
risk_level | query | string | No | Filter by maximum risk level. Allowed values: low, medium, high, critical |
curl -X GET "https://api.hoody.com/api/v1/servers/507f1f77bcf86cd799439012/available-commands?category=system&risk_level=medium"const result = await client.api.serverCommands.listIterator({ category: "system", risk_level: "medium", serverId: "507f1f77bcf86cd799439012"});{ "statusCode": 200, "message": "Available commands retrieved successfully", "data": { "commands": [ { "id": "507f1f77bcf86cd799439015", "name": "Restart Service", "slug": "restart-service", "description": "Restart a system service", "category": "system", "mode": "ssh", "command": null, "working_directory": null, "risk_level": "medium", "requires_confirmation": true, "parameter_schema": { "type": "object", "required": ["service_name"] }, "example_parameters": { "service_name": "nginx" }, "default_timeout": 300, "cooldown_seconds": 600, "rate_limit_per_hour": 10, "rate_limit_per_day": 50, "created_by": null, "execution_count": null } ], "server_info": { "id": "507f1f77bcf86cd799439012", "name": "node-us-east-1", "is_ready": true, "rental_status": "active" } }}POST /api/v1/servers/{serverId}/execute-command
Section titled “POST /api/v1/servers/{serverId}/execute-command”Executes a predefined command on a server. The command can be referenced either by its command_id (24-character hex) or by its command_slug (lowercase alphanumeric and hyphens). One of the two must be supplied.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
serverId | path | string | Yes | Server ID to execute command on |
Request Body
Section titled “Request Body”| Field | Type | Required | Default | Description |
|---|---|---|---|---|
command_id | string | No | — | Command ID to execute. Pattern: ^[0-9a-f]{24}$. Provide this or command_slug. |
command_slug | string | No | — | Command slug to execute. Pattern: ^[a-z0-9-]+$. Provide this or command_id. |
parameters | object | No | — | Parameters for command template processing |
wait | boolean | No | true | Wait for command completion before returning |
timeout | number | No | — | Command timeout in seconds (must be at least 1, at most 7200, and cannot exceed the command’s max_timeout) |
confirmation_token | string | No | — | Confirmation token for high-risk commands |
{ "command_slug": "restart-service", "parameters": { "service_name": "nginx" }, "wait": true, "timeout": 300}curl -X POST "https://api.hoody.com/api/v1/servers/507f1f77bcf86cd799439012/execute-command" \ -H "Authorization: Bearer <token>" \ -H "Content-Type: application/json" \ -d '{ "command_slug": "restart-service", "parameters": { "service_name": "nginx" }, "wait": true, "timeout": 300 }'const result = await client.api.serverCommands.execute({ serverId: "507f1f77bcf86cd799439012", data: { command_slug: "restart-service", parameters: { service_name: "nginx" }, wait: true, timeout: 300 }});{ "statusCode": 200, "message": "Command executed successfully", "data": { "command_log_id": "507f1f77bcf86cd799439016", "command_id": "507f1f77bcf86cd799439015", "status": "completed", "output": "Service restarted successfully", "exit_code": 0, "execution_time": 2453, "start_time": "2025-01-15T16:00:00.000Z", "end_time": "2025-01-15T16:00:02.453Z" }}{ "statusCode": 202, "message": "Command accepted for execution", "data": { "command_log_id": "507f1f77bcf86cd799439016", "command_id": "507f1f77bcf86cd799439015", "status": "pending", "estimated_completion": "2025-01-15T16:05:00.000Z" }}{ "statusCode": 400, "error": "Bad Request", "message": "Invalid command parameters", "data": { "missing_params": ["service_name"] }}{ "statusCode": 403, "error": "Forbidden", "message": "Not authorized to execute this command on server"}{ "statusCode": 404, "error": "Not Found", "message": "Command or server not found"}{ "statusCode": 429, "error": "Too Many Requests", "message": "Rate limit exceeded for this command", "data": { "retry_after": 3600, "rate_limit_type": "hourly" }}