Accounts-accountNumber-web-domainName-error404:PUT

From Hostway API Documentation
Jump to: navigation, search

PUT /accounts/{accountNumber}/web/{domainName}/error404

Adds/updates error page for a domain.

Contents


Request

PUT /accounts/{accountNumber}/web/{domainName}/error404

URI Parameters

accountNumber - string
The user account to which the domain name belongs
domainName - string
The target domain name (domain name under which the site is actually hosted)

Request Headers

Authorization - HTTP Authorization header [1]
The Authentication credentials of the client application.

Request Body

{
   "pageContent": "{pageContent}"
}
 

Parameters

pageContent - string
MD5-ed content of error page. Required.

Response

Status Code

202 Accepted
Success
400 Bad Request
The format of the request body is invalid.
401 Unauthorized
The supplied credentials are invalid or do not provide permissions for this operation.
404 Not Found
The domain name does not exist.
409 Conflict
The error page already exists(on create) or domain is disabled(on update).

Examples

Try to add error page to a not existing domain

Request

PUT /accounts/test-account/email/test.com/error404

{"pageContent": "PGh0bWw+PGhlYWQ+PHRpdGxlPlRlc3QgZXJyb3IgNDA0IHBhZ2UgdGl0bGU8L3RpdGxlPjwvaGVhZD48Ym9keT5UZXN0IGVycm9yIDQwNCBwYWdlIGNvbnRlbnQ8L2JvZHk+PC9odG1sPg=="}
 

Response

404 Not Found

{"itemNotFound": {"guid": "", "message": "Resource not found", "code": 404, "details": ""}}

 

Successfully adding error page

Request

PUT /accounts/test-account/email/test.com/error404

{"pageContent": "PGh0bWw+PGhlYWQ+PHRpdGxlPlRlc3QgZXJyb3IgNDA0IHBhZ2UgdGl0bGU8L3RpdGxlPjwvaGVhZD48Ym9keT5UZXN0IGVycm9yIDQwNCBwYWdlIGNvbnRlbnQ8L2JvZHk+PC9odG1sPg=="}
 

Response

 202 Accepted

 {
   "links": [{"href": "https://api.hostway.com/accounts/test-account/web/test.com/error404/", "rel": "self"},
             {"href": "https://api.hostway.com/orders/123/action/", "rel": "submit"},
             {"href": "https://api.hostway.com/orders/123/quote/", "rel": "quote"}]
 }
 

Request

POST /orders/123/action

{"action": "submit"}
 

Response

202 Accepted
 

blog comments powered by Disqus

Personal tools
Namespaces
Variants
Actions
APIs
Navigation
Toolbox