Server settings
6 source-verified client API operations in Aquadactyl.
Generated from Aquadactyl d8d016e6a40c. Read authentication and conventions first.
GET /api/client/servers/{server}/settings/subdomain
Calls SubdomainController::index.
Access: Client API key or authenticated panel session; settings.rename.
Source: Route · Controller · Request validation
Path parameters: server. See identifiers.
Response
Success: 200.
Response construction and endpoint behavior
This source excerpt includes conditional responses, metadata, pagination, and service calls for this operation.
$entry = ServerSubdomain::with('domain')->where('server_id', $server->id)->first();
return response()->json([
'domains' => SubdomainDomain::where('enabled', true)->orderBy('domain')->get(['id', 'domain']),
'subdomain' => $entry ? ['hostname' => $entry->hostname(), 'status' => $entry->status, 'minecraft_srv' => $entry->minecraft_srv, 'port' => $server->allocation->port] : null,
])->header('Cache-Control', 'no-store');Example request
curl --get "${PANEL_URL}/api/client/servers/SERVER_UUID/settings/subdomain" \
--header "Authorization: Bearer ${CLIENT_API_KEY}" \
--header "Accept: application/json"POST /api/client/servers/{server}/settings/subdomain
Calls SubdomainController::store.
Access: Client API key or authenticated panel session; settings.rename.
Source: Route · Controller · Request validation
Path parameters: server. See identifiers.
Response
Success: 200.
Response construction and endpoint behavior
This source excerpt includes conditional responses, metadata, pagination, and service calls for this operation.
$data = $request->validated();
$domain = SubdomainDomain::where('enabled', true)->findOrFail($data['domain_id']);
return Cache::lock('subdomain-reservations', 10)->block(5, function () use ($domain, $data, $server) {
abort_if(ServerSubdomain::where('server_id', $server->id)->exists(), 409, __('admin/operations.remove_subdomain_first'));
abort_if(ServerSubdomain::where('domain_id', $domain->id)->where('label', $data['label'])->exists(), 409, __('admin/operations.name_taken'));
$entry = ServerSubdomain::create($data + ['server_id' => $server->id]);
SyncServerSubdomain::dispatch($entry->id)->afterCommit();
return response()->json(['status' => 'pending'], 202);
});DELETE /api/client/servers/{server}/settings/subdomain
Calls SubdomainController::destroy.
Access: Client API key or authenticated panel session; settings.rename.
Source: Route · Controller · Request validation
Path parameters: server. See identifiers.
Response
Success: 200.
Response construction and endpoint behavior
This source excerpt includes conditional responses, metadata, pagination, and service calls for this operation.
$entry = ServerSubdomain::where('server_id', $server->id)->firstOrFail();
$entry->update(['status' => 'deleting']);
SyncServerSubdomain::dispatch($entry->id)->afterCommit();
return response()->json(['status' => 'deleting'], 202);POST /api/client/servers/{server}/settings/rename
Renames a server.
Access: Client API key or authenticated panel session; settings.rename.
Source: Route · Controller · Request validation
Model constraints: Server.php (including runtime rules and uniqueness checks for updates).
Path parameters: server. See identifiers.
Input fields
Rules use Laravel validation syntax. Dotted keys describe nested objects; * describes each array member. Model-derived rules are shown as their source expressions; model methods can add runtime constraints.
| Field | Validation |
|---|---|
name | Server::getRules()['name'] |
description | 'string|nullable' |
Response
Success: 204 (empty body).
Response construction and endpoint behavior
This source excerpt includes conditional responses, metadata, pagination, and service calls for this operation.
$name = $request->input('name');
$description = $request->has('description') ? (string) $request->input('description') : $server->description;
$this->repository->update($server->id, [
'name' => $name,
'description' => $description,
]);
if ($server->name !== $name) {
Activity::event('server:settings.rename')
->property(['old' => $server->name, 'new' => $name])
->log();
}
if ($server->description !== $description) {
Activity::event('server:settings.description')
->property(['old' => $server->description, 'new' => $description])
->log();
}
return new JsonResponse([], Response::HTTP_NO_CONTENT);POST /api/client/servers/{server}/settings/reinstall
Reinstalls the server on the daemon.
Access: Client API key or authenticated panel session; settings.reinstall.
Source: Route · Controller · Request validation
Validation is inherited from ApplicationApiRequest.php.
Path parameters: server. See identifiers.
Response
Success: 202.
Response construction and endpoint behavior
This source excerpt includes conditional responses, metadata, pagination, and service calls for this operation.
$this->reinstallServerService->handle($server);
Activity::event('server:reinstall')->log();
return new JsonResponse([], Response::HTTP_ACCEPTED);PUT /api/client/servers/{server}/settings/docker-image
Changes the Docker image in use by the server.
Access: Client API key or authenticated panel session; startup.docker-image.
Source: Route · Controller · Request validation
Path parameters: server. See identifiers.
Input fields
Rules use Laravel validation syntax. Dotted keys describe nested objects; * describes each array member. Model-derived rules are shown as their source expressions; model methods can add runtime constraints.
| Field | Validation |
| -------------- | ------------------------------------------------------------ | ---------------------------------------------------------------------------- |
| docker_image | ['required', 'string', 'max:191', 'regex:/^[\w#\.\/\- ]\*\\ | ?~?[\w\.\/\-:@ ]\*$/', Rule::in(array_values($server->egg->docker_images))] |
Response
Success: 204 (empty body).
Response construction and endpoint behavior
This source excerpt includes conditional responses, metadata, pagination, and service calls for this operation.
if (!in_array($server->image, array_values($server->egg->docker_images))) {
throw new BadRequestHttpException('This server\'s Docker image has been manually set by an administrator and cannot be updated.');
}
$original = $server->image;
$server->forceFill(['image' => $request->input('docker_image')])->saveOrFail();
if ($original !== $server->image) {
Activity::event('server:startup.image')
->property(['old' => $original, 'new' => $request->input('docker_image')])
->log();
}
return new JsonResponse([], Response::HTTP_NO_CONTENT);