API Reference

Server Management

Orchestrate and monitor your cloud infrastructure. These endpoints provide the tools to provision new servers on DigitalOcean, Contabo or OVHcloud, retrieve real-time server lists, and track provisioning progress via background tasks.

POSTadd_server

Add Server

Starts a background task to provision a new server on a selected provider (DigitalOcean, Contabo or OVHcloud; OVHcloud servers are set up by our team). It returns a taskId which can be used to track progress.

GETget_server_list

Get Server List

Fetches a paginated list of all servers owned by the user, including details about installed applications and IP addresses.

GETstatus/{task_id}

Get Task Status

Retrieves the current status of a background task. It provides a progress percentage, execution logs, and the final server IP address once the task is complete.

POSTmanage_instance

Manage Instance

Performs a specific power or administrative action on a server instance. This works across all supported cloud providers.

GETmetrics/{dropletId}

Get Performance Metrics

Retrieves historical performance data for CPU, Memory, and Bandwidth. Data is automatically grouped into time ranges: today, week, month, and year. Perfect for rendering trend charts.

GETmonitor_summary/{dropletId}

Get Usage Summary

Returns a real-time snapshot of the current resource consumption, including specific percentages for CPU, RAM, and Disk space.

GETmonitor_service_details/{dropletId}

Get Service Details

Scans the server for the operational status of critical services (e.g., Nginx, MySQL, Redis) and provides security alerts such as recent failed SSH login attempts.

GETmonitor_logs/{dropletId}

Get Server Logs

Streams the most recent journalctl log entries for core services (MySQL, Nginx, Apache, PHP) to help diagnose errors or performance bottlenecks.

GETget_services/{serverId}

List Server Services

Retrieves all services (Web Server, Database, Cache) currently installed and managed by SharkCluster on the specified server.

PUTupdate_service/{id}

Update Service Config

Updates specific configuration parameters for a service (e.g., PHP memory limit, MySQL max connections). Changes are saved to the database and automatically applied to the server's config files via SSH.

GETget_server_caching_config/{serverId}

Get Caching Config

Retrieves the current caching profile for the server, including active drivers and their respective memory allocations or port settings.

PUTupdate_server_caching_config/{serverId}

Update Caching Config

Modifies the caching configuration for the entire server. This updates the database state; depending on the changes, a service restart may be required.

POSTcontrol_server_service

Control Service Action

Perform system-level actions (Start, Stop, Restart, Purge) on specific services like Nginx, MySQL, or Redis running on a server.

POSTinstall-varnish

Install Varnish

Installs Varnish and automatically reconfigures Nginx/Apache to act as a backend.

POSTuninstall-varnish

Uninstall Varnish

Removes Varnish and restores the original port settings of your web server.

POSTrestart-varnish

Restart Varnish

Restarts the caching service to refresh configurations.

POSTstop-varnish

Stop Varnish

Stops the Varnish service.

POSTpurge-varnish

Purge Cache

Immediately flushes all cached objects from memory (Global Purge).

POSTget-varnish-vcl

Get Varnish VCL

Reads the current active Varnish configuration file (/etc/varnish/default.vcl) from the server.

POSTconfigure-varnish

Configure Varnish

Updates Varnish settings (ports, cache size, TTL) or applies a full VCL override. It automatically updates systemd overrides and Nginx proxy settings.

POSTvarnish-logs

Get Varnish Logs

Retrieves real-time or historical logs from the Varnish service.

POSTupload-varnish-vcl

Upload Varnish VCL

Uploads a custom VCL file. Includes an automatic syntax check and rollback mechanism; if the new VCL is invalid, it restores the previous backup.

GETget_server_monitoring_settings/:serverId

Get Server Monitoring Settings

Retrieves the current monitoring configuration and notification settings for a specific server.

PUTupdate_server_monitoring_settings/:serverId

Update Server Monitoring Settings

Updates the monitoring configuration (such as alert thresholds and notification emails) for a specific server.

GETget_server_other_services_config/:serverId

Get Server Other Services Config

Retrieves the configuration for auxiliary services (such as Redis, Elasticsearch, RabbitMQ, etc.) associated with a specific server.

POSTinstall-elasticsearch

Install Elasticsearch

Installs Elasticsearch (Version 7 or 8) on the server, configures the official repository, and starts the service.

POSTrestart-elasticsearch

Restart Elasticsearch

Restarts the Elasticsearch service on the server.

POSTstop-elasticsearch

Stop Elasticsearch

Stops the Elasticsearch service on the server.

POSTuninstall-elasticsearch

Uninstall Elasticsearch

Purges Elasticsearch from the server, including all data, configuration, and repository files.

POSTconfigure-elasticsearch

Configure Elasticsearch

Overwrites elasticsearch.yml and patches jvm.options for heap size. It explicitly disables X-Pack security to ensure compatibility with Magento 2.4+ without requiring SSL.

POSTelasticsearch-logs

Get Elasticsearch Logs

Fetches the recent system logs for the Elasticsearch service using journalctl.

POSTopensearch-logs

Get OpenSearch Logs

Fetches specific logs from the OpenSearch service on a server. It supports retrieving different log types such as main, GC, deprecation, slow logs, and systemd logs.

POSTinstall-opensearch

Install OpenSearch

Installs OpenSearch 2.x on the specified server. This process includes installing OpenJDK 17, adding the OpenSearch repository, configuring basic JVM memory (512MB), and setting the required kernel parameters (vm.max_map_count).

POSTrestart-opensearch

Restart OpenSearch

Restarts the OpenSearch service on the target server using systemctl.

POSTstop-opensearch

Stop OpenSearch

Gracefully stops the OpenSearch service on the target server.