Skip to main content

Getting Started with HoganHost Cloud API

Welcome to the HoganHost Cloud API. This guide will help you authenticate, create, manage, and delete your cloud servers programmatically. All API requests require a Bearer Token for authentication.

Authentication

Every request must include your API Key in the Authorization header:
  • Replace YOUR_API_KEY with the key generated in your HoganHost account.
  • Without this token, requests will be rejected with an Unauthorized error.

Create a Server

Use this endpoint to provision a new server. Specify the region, size, and image you want.
Response: Returns JSON with the server ID, IP address, and initial status.

Example Request (PHP)

Example Response


Get Server Information

Retrieve details about an existing server, including IP, region, size, and current status.
  • Replace SERVER_ID with the ID returned when the server was created.
  • The response will include resource usage, image type, and power state.

Example Request (PHP)

Example Response


Server Actions

Perform lifecycle operations on a server.
These actions let you power on/off, reboot, or shut down a server without deleting it.

Power On

Starts a stopped server.

Example Request (PHP)

Power Off

Forcefully powers down the server. Use this if shutdown does not work.

Example Request (PHP)

Shutdown

Attempts a graceful shutdown from inside the OS. Safer than power_off.

Example Request (PHP)

Reboot

Restarts the server (like pressing the reset button).

Example Request (PHP)


Delete a Server

Permanently remove a server and all its data.

Example Request (PHP)

⚠️ Warning: This action is irreversible. The server and its data cannot be recovered once deleted.

Best Practices

  • Always shut down gracefully before running power_off or delete.
  • Use reboot for planned updates, not for recovery from major failures.
  • Keep track of SERVER_ID values returned when creating servers.

Next Steps

  • Browse the API Reference for advanced endpoints.
  • Automate deployments using your favorite tools (Terraform, Ansible, CI/CD).
  • Integrate HoganHost Cloud into your apps for full infrastructure control.