Skip to main content

Forceful Stop

The /actions/:cluster/container/:containerName/kill endpoint of the Dashium API allows you to force stop a Docker container.

Endpoint​

  • Path : /actions/:cluster/container/:containerName/kill
  • Method : PUT

Parameters​

  • :cluster (path parameter): The ID of the cluster containing the container.
  • :containerName (path parameter): The name of the container to force stop.

Response​

The response confirms the successful stopping of the Docker container.

Response Example​

{
"info": "Container {containerName} force stopped!"
}

Example​

fetch('http://your-api-url/actions/your-cluster/container/your-container/kill', {
method: 'PUT',
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));