Accounts-accountNumber-web-domainName-aliases:POST
(Difference between revisions)
Mike.robski (Talk | contribs) m (1 revision: Release 105) |
(→Examples) |
||
Line 1: | Line 1: | ||
− | = | + | = POST /accounts/{accountNumber}/web/{domainName}/aliases = |
Creates domain name alias. | Creates domain name alias. | ||
Line 20: | Line 20: | ||
<nowiki> | <nowiki> | ||
{ | { | ||
− | " | + | "alias": "{alias}" |
} | } | ||
</nowiki> | </nowiki> | ||
==== Parameters ==== | ==== Parameters ==== | ||
− | ; | + | ; alias - ''string'' |
: A valid domain name. Required. | : A valid domain name. Required. | ||
Line 44: | Line 44: | ||
; 409 Conflict | ; 409 Conflict | ||
− | : The | + | : The alias already exists(on create) or domain is disabled(on update). |
== Examples == | == Examples == | ||
Line 51: | Line 51: | ||
'''Request''' | '''Request''' | ||
<nowiki> | <nowiki> | ||
− | POST accounts/ | + | POST /accounts/test-account/email/test.com/aliases |
− | {" | + | {"alias": ""} |
</nowiki> | </nowiki> | ||
Line 60: | Line 60: | ||
400 Bad Request | 400 Bad Request | ||
− | {"badRequest": {"guid": "", "message": "POST data error", "code": 400, "details": {" | + | {"badRequest": {"guid": "", "message": "POST data error", "code": 400, "details": {"alias": "Required"}}} |
</nowiki> | </nowiki> | ||
Line 67: | Line 67: | ||
'''Request''' | '''Request''' | ||
<nowiki> | <nowiki> | ||
− | POST accounts/ | + | POST /accounts/test-account/email/test.com/aliases |
− | {" | + | {"alias": "alias"} |
</nowiki> | </nowiki> | ||
Line 76: | Line 76: | ||
400 Bad Request | 400 Bad Request | ||
− | {"badRequest": {"guid": "", "message": "POST data error", "code": 400, "details": {" | + | {"badRequest": {"guid": "", "message": "POST data error", "code": 400, "details": {"alias": "Invalid domain name in alias: test"}}} |
</nowiki> | </nowiki> | ||
Line 83: | Line 83: | ||
'''Request''' | '''Request''' | ||
<nowiki> | <nowiki> | ||
− | POST accounts/ | + | POST /accounts/test-account/email/test.com/aliases |
− | {" | + | {"alias": "alias.com"} |
</nowiki> | </nowiki> | ||
Revision as of 08:20, 6 April 2015
POST /accounts/{accountNumber}/web/{domainName}/aliases
Creates domain name alias.
Contents |
Request
GET /accounts/{accountNumber}/web/{domainName}/aliases
URI Parameters
- accountNumber - string
- The user account to which the domain name and the domain name alias belong
- 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
{ "alias": "{alias}" }
Parameters
- alias - string
- A valid domain name. Required.
Response
Status Code
- 202 Accepted
- Success
- 400 Bad Request
- The format of the request body is invalid or the alias does not meet the requirements.
- 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 alias already exists(on create) or domain is disabled(on update).
Examples
Failure creating a domain alias when required parameter is missing
Request
POST /accounts/test-account/email/test.com/aliases {"alias": ""}
Response
400 Bad Request {"badRequest": {"guid": "", "message": "POST data error", "code": 400, "details": {"alias": "Required"}}}
Failure creating a domain alias when passing invalid parameter
Request
POST /accounts/test-account/email/test.com/aliases {"alias": "alias"}
Response
400 Bad Request {"badRequest": {"guid": "", "message": "POST data error", "code": 400, "details": {"alias": "Invalid domain name in alias: test"}}}
Successfully creating a domain alias
Request
POST /accounts/test-account/email/test.com/aliases {"alias": "alias.com"}
Response
202 Accepted