Remote-reboot-dedicatedServer:POST
From Hostway API Documentation
				
								
				(Difference between revisions)
				
																
				
				
								
				 (→Expected Response Codes)  | 
		Mike.robski  (Talk | contribs)  m (1 revision: Release 111)  | 
		
Latest revision as of 11:15, 18 September 2015
[edit] POST /accounts/{account_number}/dedicatedServers/{server_id}/action
Apply an action on a dedicated server e.g. remote reboot
Contents | 
[edit] Request
POST /accounts/{account_number}/dedicatedServers/{server_id}/action
[edit] 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.
 
[edit] Request Headers
- Authorization - HTTP Authorization header [1]
 - The Authentication credentials of the client application.
 
[edit] 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.
 
[edit] Response
[edit] 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.
 
[edit] Examples
[edit] 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
[edit] See also