Email-domain-usernames-mailboxName-webmail:PUT

(Difference between revisions)
Jump to: navigation, search
m (1 revision: Release 93)
(Parameters)
Line 23: Line 23:
 
{
 
{
 
     "type": "{type}",
 
     "type": "{type}",
     "allowUpgrade": {allowUpgrade}
+
     "allowUpgrade": {allowUpgrade},
 +
    "theme": "{theme}",
 +
    "language": "{language}",
 +
    "timezone": "{timezone}"
 
}
 
}
 
  </nowiki>
 
  </nowiki>
Line 36: Line 39:
 
: If type is already different than standard and allowUpgrade is set to false the response is ''400 Bad Request''
 
: If type is already different than standard and allowUpgrade is set to false the response is ''400 Bad Request''
 
: If current usage is more than new type quota the response is ''400 Bad Request''
 
: If current usage is more than new type quota the response is ''400 Bad Request''
 +
: If current mailbox qty is more than allowed for specific OpenXchange account type the response is ''400 Bad Request''
 +
; theme - ''string''
 +
: Theme identifier for setting a specific theme when creating an OX account.
 +
; language - ''string''
 +
: OpenXchange account locale of type 'en_US'.
 +
; timezone - ''string''
 +
: OpenXchange account timezone of type 'America/Chicago'.
  
 
== Response ==
 
== Response ==
Line 114: Line 124:
 
  </nowiki>
 
  </nowiki>
  
=== Failure when upgrading the account while allowUpgrade is set to false ===
+
=== Failure upgrading account while allowUpgrade is set to false ===
 
'''Request'''
 
'''Request'''
 
  <nowiki>
 
  <nowiki>
Line 127: Line 137:
  
 
{"message": "This account is not allowed to be upgraded"}
 
{"message": "This account is not allowed to be upgraded"}
 +
</nowiki>
 +
 +
=== Failure upgrading account when mailbox qty for OX type is exceeded ===
 +
'''Request'''
 +
<nowiki>
 +
PUT /email/test.com/usernames/john.smith/webmail
 +
 +
{"type": "activesync"}
 +
</nowiki>
 +
 +
'''Response'''
 +
<nowiki>
 +
400 Bad Request
 +
 +
{"computeFault":"Number of mailboxes exceeded"}
 
  </nowiki>
 
  </nowiki>
  
Line 142: Line 167:
 
</nowiki>
 
</nowiki>
  
=== Failure when downgrading the account due to current usage greater than new quota ===
+
=== Failure downgrading account due to current usage greater than new quota ===
 
'''Request'''
 
'''Request'''
 
  <nowiki>
 
  <nowiki>
Line 156: Line 181:
 
{"message": "Current mailbox usage is larger than the new quota value"}
 
{"message": "Current mailbox usage is larger than the new quota value"}
 
  </nowiki>
 
  </nowiki>
 +
 +
=== Success updating timezone, language and theme ===
 +
'''Request'''
 +
<nowiki>
 +
PUT /email/test.com/usernames/john.smith/webmail
 +
 +
{"theme": "new_theme", "language": "en_US", "timezone": "America/Chicago"}
 +
</nowiki>
 +
 +
'''Response'''
 +
<nowiki>
 +
204 No Content
 +
</nowiki>
 +
  
 
{{disqus}}
 
{{disqus}}
 
[[Category:Hostway API]]
 
[[Category:Hostway API]]
 
[[Category:Email API]]
 
[[Category:Email API]]

Revision as of 08:31, 17 June 2014

PUT /email/{domain}/usernames/{mailboxName}/webmail

Upgrades/downgrades OpenXchange account type.

Contents


Request

PUT /email/{domain}/usernames/{mailboxName}/webmail

URI Parameters

domain - string
mailboxName - string

Request Headers

Authorization - HTTP Authorization header [1]
Use the mailbox owner credentials for the specific mailbox, e.g. username: email@domain.com, password: secret
Content-Type
Required. Set this header to application/json; charset=UTF-8

Request Body

{
    "type": "{type}",
    "allowUpgrade": {allowUpgrade},
    "theme": "{theme}",
    "language": "{language}",
    "timezone": "{timezone}"
}
 


Parameters

allowUpgrade - boolean
OpenXchange allowUpgrade option value
type - string - one of "standard", "activesync" or "premium"
OpenXchange account type. Valid values are standard, activesync, premium. Required.
If allowUpgrade is set to false providing a type different than standard results in a 400 Bad Request response
If type is already different than standard and allowUpgrade is set to false the response is 400 Bad Request
If current usage is more than new type quota the response is 400 Bad Request
If current mailbox qty is more than allowed for specific OpenXchange account type the response is 400 Bad Request
theme - string
Theme identifier for setting a specific theme when creating an OX account.
language - string
OpenXchange account locale of type 'en_US'.
timezone - string
OpenXchange account timezone of type 'America/Chicago'.

Response

Status Code

204 No Content
Success
400 Bad Request
The format of the request body is invalid or the username 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.

Examples

Failure updating account type with empty type

Request

PUT /email/test.com/usernames/john.smith/webmail

{"type": ""}
 

Response

400 Bad Request

{"type": "Required"}
 

Failure updating account type with invalid type

Request

PUT /email/test.com/usernames/john.smith/webmail

{"type": "invalid-type"}
 

Response

400 Bad Request

{"type": "\"invalid-type\" is not one of standard, activesync, premium"}
 

Failure using inconsistent combination of allowUpgrade and type

Request

PUT /email/test.com/usernames/john.smith/webmail

{"type": "premium", "allowUpgrade": false}
 

Response

400 Bad Request

{"message": "The allowUpgrade option is inconsistent with the provided type"}
 

Failure changing the allowUpgrade option for activesync or premium accounts

Request

PUT /email/test.com/usernames/john.smith/webmail

{"allowUpgrade": false}
 

Response

400 Bad Request

{"message": "The account is already upgraded. Please downgrade it to standard first."}
 

Failure upgrading account while allowUpgrade is set to false

Request

PUT /email/test.com/usernames/john.smith/webmail

{"type": "premium"}
 

Response

400 Bad Request

{"message": "This account is not allowed to be upgraded"}
 

Failure upgrading account when mailbox qty for OX type is exceeded

Request

PUT /email/test.com/usernames/john.smith/webmail

{"type": "activesync"}
 

Response

400 Bad Request

{"computeFault":"Number of mailboxes exceeded"}
 

Success updating account type

Request

PUT /email/test.com/usernames/john.smith/webmail

{"type": "premium"}
 

Response

204 No Content

Failure downgrading account due to current usage greater than new quota

Request

PUT /accounts/test/email/test.com/usernames/john.smith/webmail

{"type": "standard"}
 

Response

400 Bad Request

{"message": "Current mailbox usage is larger than the new quota value"}
 

Success updating timezone, language and theme

Request

PUT /email/test.com/usernames/john.smith/webmail

{"theme": "new_theme", "language": "en_US", "timezone": "America/Chicago"}
 

Response

204 No Content



blog comments powered by Disqus

Personal tools
Namespaces
Variants
Actions
APIs
Navigation
Toolbox