Update server
Updates details in your server
PATCH api/servers/{server}
Parameters
Parameter | Type | Status | Description |
---|---|---|---|
name | string | required | A string that represents your server name |
ip | string | optional | A valid IPv4 address |
ssh_port | integer | required if ip is filled | An integer representing your SSH port, default is 22 |
Example request:
curl -X PATCH "https://ploi.io/api/servers/{server}" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
--data '{"name":"awesome-server", "ip":"1.1.1.1", "ssh_port": 22}'
Example response:
HTTP/1.1 200 OK
Content-Type: application/json
{
"data": {
"id": 1,
"status": "active",
"type": "server",
"database_type": "mysql",
"name": "awesome-server",
"ip_address": "1.1.1.1",
"internal_ip": null,
"ssh_port": 22,
"reboot_required": false,
"php_version": 8.2,
"php_cli_version": "8.2",
"mysql_version": 5.7,
"sites_count": 0,
"monitoring": false,
"opcache": false,
"installed_php_versions": [
"8.2"
],
"updates": {
"packages": 0,
"security": 0
},
"description": null,
"status_id": 2,
"provider": {
"id": 1,
"name": "Katapult"
},
"created_at": "2023-08-13 19:23:58",
"created_human": "1 week ago",
"uptime_human": null
}
}