Suspend Server with Application API¶
Suspend the given server.
Usage¶
<?php
$pterodactyl->suspendServer($serverId);
//For a server instance
$server->suspend();
?>
Parameters¶
Note
The serverId
is the id
of the server, not identifier
, externalId
or uuid
.
Parameter | Description | Rules |
---|---|---|
serverId | The id of the server |
Returns¶
None
Throwing exception if failed.
Example¶
<?php
try {
$pterodactyl->suspendServer(14);
} catch(\Exception $e){
print_r($e->getMessage());
}
?>
<?php
try {
$server = $pterodactyl->server(14);
$server->suspend();
} catch(\Exception $e){
print_r($e->getMessage());
}
?>