API Reference
POST
configure-elasticsearchConfigure 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
POST
https://api.sharkcluster.com/configure-elasticsearchHow do you call Configure Elasticsearch?
- 1Send a POST request to https://api.sharkcluster.com/configure-elasticsearch.
- 2Include the required parameters: server_id and config.
Request parameters
| Parameter | Type | Description |
|---|---|---|
server_idRequired | string | The unique identifier or Instance ID of the server. |
configRequired | object | cluster_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"
}
});
Related Server Management endpoints
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.