API Reference
POSTconfigure-elasticsearch

Configure Elasticsearch

Configure Elasticsearch is a POST request to https://api.sharkcluster.com/configure-elasticsearch in the Server Management section of the SharkCluster API. 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. It takes 2 parameters, 2 required (server_id and config).

Request URL

POSThttps://api.sharkcluster.com/configure-elasticsearch

How do you call Configure Elasticsearch?

  1. 1Send a POST request to https://api.sharkcluster.com/configure-elasticsearch.
  2. 2Include the required parameters: server_id and config.

Request parameters

ParameterTypeDescription
server_id
Required
stringThe unique identifier or Instance ID of the server.
config
Required
objectcluster_name (string): e.g., "magento-cluster" node_name (string): e.g., "Node_1" network_host (string): Default "localhost" http_port (number): Default 9200 xms_(initial_heap) (string): e.g., "512m" xmx_(max_heap) (string): e.g., "1g"

What does Configure Elasticsearch return?

A failed call explains the problem in the body, for example "Error description (e.g., Server not found)".

Request sample

const axios = require('axios');
const response = await axios.post('/configure-elasticsearch', {
    server_id: "21cda6fc-8c68...",
    config: {
        cluster_name: "prod-cluster",
        "xms_(initial_heap)": "512m",
        "xmx_(max_heap)": "512m"
    }
});

Stuck on an integration?

Raise a ticket from the panel with the endpoint and the response you got back — it reaches an engineer with your server already attached.

Contact us