API Reference
PUT
update_service/{id}Update Service Config
Update Service Config is a PUT request to https://api.sharkcluster.com/update_service/{id} in the Server Management section of the SharkCluster API. Updates specific configuration parameters for a service (e.g., PHP memory limit, MySQL max connections). Changes are saved to the database and automatically applied to the server's config files via SSH. It takes 2 parameters, 2 required (id and settings).
Request URL
PUT
https://api.sharkcluster.com/update_service/{id}How do you call Update Service Config?
- 1Get a token from the login endpoint (POST /login) and send it as Authorization: Bearer <token>. See Login.
- 2Send a PUT request to https://api.sharkcluster.com/update_service/{id}, replacing {id} in the path with your own value.
- 3Include the required parameter: settings.
Request parameters
| Parameter | Type | Description |
|---|---|---|
idRequired | string | The unique ID of the service record. |
settingsRequired | string | Key-value pairs of settings to update (e.g., {"memory_limit": "256M"}). |
What does Update Service Config return?
A successful call returns a JSON object with the fields message and service.
Request sample
const axios = require('axios');
const serviceId = "55"; // The ID of the specific service (e.g., PHP)
const configData = {
settings: {
interactive_timeout: "3"
max_connections: "512M",
query_cache_size: "100M",
wait_timeout: "100M"
}
};
axios.put(`https://api.sharkcluster.com/update_service/${serviceId}`, configData, {
headers: { 'Authorization': 'Bearer YOUR_TOKEN' }
})
.then(res => console.log("Update Result:", res.data.message))
.catch(err => console.error(err));Response
{
"message": "Service updated successfully",
"service": {
"id": "00000000-0000-4000-8000-000000000011",
"serverId": "00000000-0000-4000-8000-000000000008",
"name": "MySQL",
"status": "active",
"enabled": true,
"logo": "badg2",
"version": "8.0",
"port": 3306,
"documentRoot": "N/A",
"maxConnections": "151",
"timeout": "N/A",
"errorLog": "/var/log/mysql/error.log",
"accessLog": "N/A",
"settings": {
"max_connections": "151",
"wait_timeout": "10",
"interactive_timeout": "3",
"query_cache_size": "10"
},
"createdAt": "2026-05-05T08:45:34.188Z",
"updatedAt": "2026-05-05T09:17:30.175Z"
}
}Related Server Management endpoints
- GET
monitor_service_details/{dropletId}Get Service Details - GET
monitor_logs/{dropletId}Get Server Logs - GET
get_services/{serverId}List Server Services - GET
get_server_caching_config/{serverId}Get Caching Config - PUT
update_server_caching_config/{serverId}Update Caching Config - POST
control_server_serviceControl Service Action
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.