#[Group('Admin API','Root administrator endpoints for managing panel configuration and resources.')]
#[Subgroup('Nodes','Create, update, retrieve, and delete Wings nodes.')]
classNodeControllerextendsAdminApiController
{
privateconstarrayHAS_SERVERS_ERROR=[
'errors'=>[
[
'code'=>'HasActiveServersException',
'status'=>'400',
'detail'=>'This node has active servers and cannot be deleted.',
],
],
];
/**
* List nodes.
*/
#[Endpoint('List nodes','Returns a paginated list of Wings nodes.')]
#[QueryParam('filter[uuid]','string','Filter nodes by UUID.',required:false,example:'1b19cf3f-2f89-4f88-a81e-321e7fe326bc')]
#[QueryParam('filter[name]','string','Filter nodes by name.',required:false,example:'node-1')]
#[QueryParam('filter[fqdn]','string','Filter nodes by FQDN.',required:false,example:'node.example.com')]
#[QueryParam('sort','string','Sort nodes by id, uuid, name, memory, disk, or creation time. Prefix with a hyphen for descending order.',required:false,example:'-created_at')]
#[QueryParam('page','integer','Page number to return.',required:false,example:1)]
#[QueryParam('per_page','integer','Results to return per page.',required:false,example:50)]
#[QueryParam('include','string','Comma-separated relationships to include. Supports "allocations", "location", "servers", "tags" (the games the node accepts), and "deployment_tags" (its reservations).',required:false,example:'location',enum:['allocations','location','servers','allocations,location','location,servers','tags','deployment_tags','tags,deployment_tags'])]
#[QueryParam('include','string','Comma-separated relationships to include. Supports "allocations", "location", "servers", "tags" (the games the node accepts), and "deployment_tags" (its reservations).',required:false,example:'location',enum:['allocations','location','servers','allocations,location','location,servers','tags','deployment_tags','tags,deployment_tags'])]