View .md

Import endpoints (Client API: game servers)

2 FeatherPanel Client API: game servers endpoints from user/server/import.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/import.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

POST/api/user/servers/{uuidShort}/import

Auth: Server accessDefault rate limit: 5 / minute (user-server-import)Route name: user-server-importController: ServerImportController::importServerroute source

Import server files Import server files from a remote SFTP or FTP server. The server must be offline for imports to work.

ParameterInTypeRequiredDescription
uuidShortpathstringyesServer short UUID

Request body: ServerImportRequest (application/json)

Body fieldTypeRequiredDescription
userstringyesUsername for SFTP/FTP authentication
passwordstringyesPassword for SFTP/FTP authentication
hotestringyesHostname or IP address of the remote server
portintegeryesPort number (1-65535). Typically 22 for SFTP, 21 for FTP
srclocationstringyesSource path on the remote server (absolute path)
dstlocationstringyesDestination path on the local server (relative to server root)
wipebooleannoIf true, clears the destination directory before importing
typestringyesConnection type
curl -X POST "$PANEL_URL/api/user/servers/$UUID_SHORT/import" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"user":"","password":"","hote":"","port":0,"srclocation":"","dstlocation":"","wipe":false,"type":""}'

Plugin events: featherpanel:server:update

Responses: 202 Import process started successfully · 400 Bad request - Invalid data or server is online · 401 Unauthorized · 403 Forbidden - Feature disabled or insufficient permissions · 404 Server or node not found · 409 Conflict - Server is executing another power action · 500 Internal server error

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

Auth: Server accessDefault rate limit: 30 / minute (user-server-import)Route name: user-server-imports-listController: ServerImportController::listImportsroute source

List server imports Get a list of all imports for a server with their statuses.

ParameterInTypeRequiredDescription
uuidShortpathstringyesServer short UUID
Response data fieldTypeDescription
successboolean
dataobject
curl -X GET "$PANEL_URL/api/user/servers/$UUID_SHORT/imports" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"

Responses: 200 List of imports · 401 Unauthorized · 403 Forbidden · 404 Server not found