View .md

Allocations endpoints (Client API: game servers)

6 FeatherPanel Client API: game servers endpoints from user/server/allocations.php: methods, paths, auth, permissions, rate limits, parameters and responses.

Last synced from FeatherPanel 15b94e9 on .

On this page

Defined in backend/app/routes/user/server/allocations.php. Authentication used here: Server access. Read Authentication for how to send credentials and Rate limits and errors for the response envelope.

Paths, methods, permissions and rate limits come from the route file. Summaries, parameters and response codes come from the OpenAPI annotations on the controllers; endpoints without annotations show only what the route file declares.

Endpoints

GET/api/user/servers/{uuidShort}/allocations

Auth: Server accessDefault rate limit: 30 / minute (user-server-allocations)Route name: session-server-allocationsController: ServerAllocationController::getServerAllocationsroute source

Get server allocations Retrieve all allocations assigned to a specific server that the user owns or has subuser access to.

ParameterInTypeRequiredDescription
uuidShortpathstringyesServer short UUID

Response data: AllocationResponse

Response data fieldTypeDescription
serverServerAllocationInfo
allocationsServerAllocation[]
curl -X GET "$PANEL_URL/api/user/servers/$UUID_SHORT/allocations" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"

Responses: 200 Server allocations retrieved successfully · 400 Bad request - Missing or invalid UUID short · 401 Unauthorized - User not authenticated · 403 Forbidden - Access denied to server · 404 Not found - Server not found · 500 Internal server error - Failed to retrieve allocations

DELETE/api/user/servers/{uuidShort}/allocations/{allocationId}

Auth: Server accessDefault rate limit: 10 / minute (user-server-allocations)Route name: session-server-delete-allocationController: ServerAllocationController::deleteAllocationroute source

Delete server allocation Remove an allocation from a server. Cannot delete the primary allocation.

ParameterInTypeRequiredDescription
uuidShortpathstringyesServer short UUID
allocationIdpathintegeryesAllocation ID to delete

Response data: AllocationDeleteResponse

Response data fieldTypeDescription
messagestringSuccess message
deleted_allocation_idintegerID of the deleted allocation
curl -X DELETE "$PANEL_URL/api/user/servers/$UUID_SHORT/allocations/$ALLOCATION_ID" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"

Plugin events: featherpanel:user:server:allocation:deleted

Responses: 200 Allocation deleted successfully · 400 Bad request - Missing parameters, allocation mismatch, or primary allocation deletion attempt · 401 Unauthorized - User not authenticated · 403 Forbidden - Access denied to server · 404 Not found - Server or allocation not found · 500 Internal server error - Failed to delete allocation

POST/api/user/servers/{uuidShort}/allocations/{allocationId}/primary

Auth: Server accessDefault rate limit: 5 / minute (user-server-allocations)Route name: session-server-set-primary-allocationController: ServerAllocationController::setPrimaryAllocationroute source

Set primary allocation Set a specific allocation as the primary allocation for the server.

ParameterInTypeRequiredDescription
uuidShortpathstringyesServer short UUID
allocationIdpathintegeryesAllocation ID to set as primary

Response data: PrimaryAllocationResponse

Response data fieldTypeDescription
messagestringSuccess message
new_primary_allocation_idintegerID of the new primary allocation
curl -X POST "$PANEL_URL/api/user/servers/$UUID_SHORT/allocations/$ALLOCATION_ID/primary" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"

Plugin events: featherpanel:user:server:allocation:set_primary

Responses: 200 Primary allocation updated successfully · 400 Bad request - Missing parameters or allocation mismatch · 401 Unauthorized - User not authenticated · 403 Forbidden - Access denied to server · 404 Not found - Server or allocation not found · 500 Internal server error - Failed to update primary allocation

PATCH/api/user/servers/{uuidShort}/allocations/{allocationId}/notes

Auth: Server accessDefault rate limit: 20 / minute (user-server-allocation-notes)Route name: session-server-allocation-notesController: ServerAllocationController::updateAllocationNotesroute source

Update allocation note Set or clear the note the server's users keep on one of its allocations. The note is removed automatically when the allocation leaves the server.

ParameterInTypeRequiredDescription
uuidShortpathstringyesServer short UUID
allocationIdpathintegeryesAllocation ID
Body fieldTypeRequiredDescription
notesstringnoNote text; empty or null clears it
curl -X PATCH "$PANEL_URL/api/user/servers/$UUID_SHORT/allocations/$ALLOCATION_ID/notes" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"notes":""}'

Responses: 200 Note updated · 400 Invalid note or allocation mismatch · 403 Missing allocation.update permission · 404 Server or allocation not found

GET/api/user/servers/{uuidShort}/allocations/available

Auth: Server accessDefault rate limit: 30 / minute (user-server-allocations)Route name: session-server-available-allocationsController: ServerAllocationController::getAvailableAllocationsroute source

Get available allocations Retrieve all available (unassigned) allocations that can be assigned to the server. Supports pagination and search.

ParameterInTypeRequiredDescription
uuidShortpathstringyesServer short UUID
pagequeryintegernoPage number (default: 1)
limitqueryintegernoItems per page (default: 20, max: 100)
searchquerystringnoSearch query for IP address, port, alias, or notes
Response data fieldTypeDescription
allocationsServerAllocation[]
paginationobject
searchobject
curl -X GET "$PANEL_URL/api/user/servers/$UUID_SHORT/allocations/available" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"

Responses: 200 Available allocations retrieved successfully · 401 Unauthorized - User not authenticated · 403 Forbidden - Access denied to server · 404 Not found - Server not found

POST/api/user/servers/{uuidShort}/allocations/auto

Auth: Server accessDefault rate limit: 5 / minute (user-server-allocations)Route name: user-server-allocations-autoController: ServerAllocationController::autoAllocateroute source

Auto-allocate allocation Automatically assign a free allocation to the server. Only assigns one allocation at a time. Optionally accepts an allocation_id to assign a specific allocation.

ParameterInTypeRequiredDescription
uuidShortpathstringyesServer short UUID

Response data: AutoAllocationResponse

Body fieldTypeRequiredDescription
allocation_idintegernoSpecific allocation ID to assign. If not provided, a random allocation will be selected.
Response data fieldTypeDescription
assigned_allocationServerAllocation
messagestringSuccess message
curl -X POST "$PANEL_URL/api/user/servers/$UUID_SHORT/allocations/auto" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"allocation_id":0}'

Plugin events: featherpanel:server:allocation:create

Responses: 200 Allocation assigned successfully · 400 Bad request - Missing UUID, allocation limit reached, no free allocations available, or invalid allocation ID · 401 Unauthorized - User not authenticated · 403 Forbidden - Access denied to server · 404 Not found - Server or allocation not found · 500 Internal server error - Failed to assign allocation