Description
Create mail services.
Request URL
Mail API v1.0 POST /v1/services
Request Paramters
Parameter | Value | Style | Description |
---|---|---|---|
X-Auth-Token | - | header | User Token |
service_name | - | plain | Service Name、文字種別:半角英数字、-(ハイフン)、_(アンダースコア)、文字長:1~255文字 |
default_sub_domain | - | plain | デフォルトサブドメイン、文字種別:半角英小文字、半角数字、-(ハイフン)(※但し、-(ハイフン)は先頭と末尾は禁止)、文字長:1~63文字 |
Response Paramters
Parameter | Value | Style | Type | Description |
---|---|---|---|---|
service | - | plain | dict | - |
status | active | plain | string | Status |
service_id | - | plain | UUID | Service ID |
service_name | - | plain | string | Service Name |
smtp | - | plain | string | SMTP Host Name |
pop | - | plain | string | POP Host Name |
imap | - | plain | string | IMAP Host Name |
mx | - | plain | string | MX Host Name |
quota | - | plain | int | Quota for Use(Unit:GB) |
total_usage | - | plain | float | Total Usage(Unit:GB)It displays the number with two decimal point. |
default_domain | - | plain | string | Default Domain |
backup | disable | plain | string | Backup Setting : enable/disable |
Request Json
{ "service_name": "testservice", "default_sub_domain": "default" }
Normal response codes
200 - Success
Error response codes
400 - Bad Request
401 - Access Denied
409 - Conflict
Repeatable
No
Example
curl -i -X POST \ -H "Accept: application/json" \ -H "X-Auth-Token: 39be9f8d53044388b7f2e867eba8b140" \ -d '{ "service_name": "testservice01", "default_sub_domain": "default" }' \ https://mail-hosting.tyo1.cloud.z.com/v1/services
HTTP/1.1 200 Success Date: Tue, 09 Dec 2014 01:46:58 GMT Server: Apache Content-Length: 1003 Content-Type: application/json { "service":{ "status": "active", "service_id": "4998f0beb08e16a", "service_name": "testservice", "smtp": "14124342342.smtp.cloud.z.com", "pop": "14124342342.pop.cloud.z.com", "imap": "14124342342.imap.cloud.z.com", "mx": "mx.unit01.paasmail.tyo1.cloud.z.com", "quota": 540, "total_usage": 100, "default_domain": "default.cloud.z.com", "backup": "disable", "create_date": "2015-04-07T04:19:05Z" } }