Send Commands
Servers
Send Commands
POST
Send Commands
Sends one or more commands to a running server instance.
Authentication
Requires the Wings authentication token in theAuthorization header:
Path Parameters
string
required
The UUID of the server
Request Body
array
required
Array of command strings to send to the server. Each command is sent sequentially.
Response
Returns204 No Content when commands have been sent successfully.
Error Responses
The requested server does not exist on this Wings instance.
Cannot send commands to a stopped server instance.
An error occurred while checking if the server is running.
Behavior
- Checks if the server is running before sending commands
- If the server is not running, returns a 502 error
- Commands are sent sequentially in the order provided
- If a command fails to send, an error is logged but subsequent commands are still attempted
- Command failures do not cause the API request to fail
Example Request
Example Response
Notes
- Commands are executed in the server’s console/stdin
- The server must be in a running state (not offline, starting, or stopping)
- Individual command failures are logged but don’t fail the entire request
- There is no response body indicating which commands succeeded or failed
- Commands are sent to the environment (Docker container) via stdin
Source Reference
Implemented inrouter/router_server.go:108