Remote-reboot-dedicatedServer:POST
From Hostway API Documentation
Revision as of 11:15, 18 September 2015 by Mike.robski (Talk | contribs)
POST /accounts/{account_number}/dedicatedServers/{server_id}/action
Apply an action on a dedicated server e.g. remote reboot
Contents |
Request
POST /accounts/{account_number}/dedicatedServers/{server_id}/action
Request Parameters
- account_number - string
- The user account owning the dedicated servers.
- server_id - string
- Server id of the dedicated server that will be rebooted.
Request Headers
- Authorization - HTTP Authorization header [1]
- The Authentication credentials of the client application.
Request Body
{ "action": "reboot", "actionData": "" }
- action - string
- The action that should be performed. Allowed values are:
- reboot - remote reboot of the dedicated server.
- actionData - string (optional)
- Data to be send with the action.
Response
Expected Response Codes
- 202 Accepted
- Success
- 400 Bad Request
- The supplied action is invalid.
- 401 Unauthorized
- The supplied credentials are invalid.
- 403 Forbidden
- The authorized user does not have permissions to access the resource. The only user(s) who has access to the dedicated servers must be a sales agent, the account owner, or the account technical admin.
- 404 Not Found
- The dedicated server does not exist.
- 502 Bad Gateway
- Internal error when issuing an action request.
Examples
Request remote reboot of a dedicated server
Request
POST /accounts/test-account123/dedicatedServers/server-id-1/action Content-Type:application/json; Charset=UTF-8 Authorization: Basic {Base64 string} { "action": "reboot" }
Response
202 Accepted
See also