Restart
The /actions/:cluster/container/:containerName/restart endpoint of the Dashium API allows you to restart a Docker container.
Endpointβ
- Path:
/actions/:cluster/container/:containerName/restart - Method:
PUT
Parametersβ
:cluster(path parameter): The ID of the cluster containing the container.:containerName(path parameter): The name of the container to restart.
Responseβ
The response confirms the successful restart of the Docker container.
Response Exampleβ
{
"info": "Container {containerName} restarted!"
}
Exampleβ
fetch('http://your-api-url/actions/your-cluster/container/your-container/restart', {
method: 'PUT',
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));