API Reference
POSTrestart-opensearch

Restart OpenSearch

Restart OpenSearch is a POST request to https://api.sharkcluster.com/restart-opensearch in the Server Management section of the SharkCluster API. Restarts the OpenSearch service on the target server using systemctl. It takes 1 parameter, 1 required (server_id).

Request URL

POSThttps://api.sharkcluster.com/restart-opensearch

How do you call Restart OpenSearch?

  1. 1Send a POST request to https://api.sharkcluster.com/restart-opensearch.
  2. 2Include the required parameter: server_id.

Request parameters

ParameterTypeDescription
server_id
Required
stringThe ID of the server where OpenSearch should be installed.

What does Restart OpenSearch return?

A failed call explains the problem in the body, for example "Failed to restart OpenSearch".

Request sample

const axios = require('axios');
axios.post('https://api.sharkcluster.com/restart-opensearch', { server_id: "server_123" })
  .then(response => console.log(response.data))
  .catch(error => console.error(error.response.data));

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