Update iRedAdmin-Pro RESTful API doc.

This commit is contained in:
Zhang Huangbin 2017-01-13 13:29:51 +08:00
parent b0ba1dbcf9
commit e4dcade84f
2 changed files with 151 additions and 35 deletions

View File

@ -75,7 +75,7 @@ Notes:
<div class="params params_domain">
Parameter Name | Summary | Sample Usage
Parameter | Summary | Sample Usage
--- |--- |---
`name` | Short description of this domain name. e.g. company name | `name=Google Inc`
`quota` | Per-domain mailbox quota, in MB. | `quota=2048`
@ -97,7 +97,7 @@ Notes:
<div class="params params_domain">
Parameter Name | Summary | Sample Usage
Parameter | Summary | Sample Usage
--- |--- |---
`name` | Short description of this domain name. e.g. company name | `name=Google Inc`
`accountStatus` | Enable or disable domain. Possible values: `active`, `disabled`. | `accountStatus=active`
@ -124,7 +124,7 @@ Notes:
<div class="params params_domain_services">
Parameter Name | Summary | Sample Usage
Parameter | Summary | Sample Usage
--- |--- |---
`enableService` | Enable new services. Multiple services must be separated by comma. | `enableService=sogo,vpn,xmpp`
`disableService` | Disable existing services. Multiple services must be separated by comma. | `disableService=sogo,vpn,xmpp`
@ -141,7 +141,7 @@ Notes:
Normal domain admin can only promote mail users under managed domains
to be a domain admin.
Parameter Name | Summary | Sample Usage
Parameter | Summary | Sample Usage
--- |--- |---
`addAdmin` | Add new domain admins. Multiple services must be separated by comma. | `addAdmin=one@domain.com,two@domain.com`
`removeAdmin` | Remove existing domain admins. Multiple services must be separated by comma. | `removeAdmin=one@domain.com,two@domain.com`
@ -161,16 +161,42 @@ Notes:
<div class="params params_admin">
Parameter Name | Summary | Sample Usage
Parameter | Summary | Sample Usage
--- |--- |---
`name` | Display name | `name=My Admin Name`
`password` | Password| `password=AsTr0ng@`
`accountStatus` | Enable or disable account. Possible values: `active`, `disabled`. | `accountStatus=active`
`language` | Preferred language of iRedAdmin web UI | `language=en_US`
`domainGlobalAdmin` | Mark this admin as global admin | `domainGlobalAdmin=yes`
`isGlobalAdmin` | Mark this admin as global admin | `isGlobalAdmin=yes`
</div>
!!! api "`DELETE`{: .delete } `/api/admin/<mail>`{: .url } `Delete an existing domain admin`{: .comment } `upcoming`{: .upcoming }"
!!! api "`PUT`{: .put } `/api/admin/<mail>`{: .url } `Update profile of an existing domain admin`{: .comment } `upcoming`{: .upcoming } `Parameters`{: .has_params }"
<div class="params params_admin">
Parameter | Summary | Sample Usage
--- |--- |---
`name` | Display name | `name=My Admin Name`
`password` | Password| `password=AsTr0ng@`
`accountStatus` | Enable or disable account. Possible values: `active`, `disabled`. | `accountStatus=active`
`language` | Preferred language of iRedAdmin web UI | `language=en_US`
`isGlobalAdmin` | Mark this admin as global admin | `isGlobalAdmin=yes`
Below parameters are used by normal domain admin. With `isGlobalAdmin=yes`, they will be removed.
Parameter | Summary | Sample Usage
--- |--- |---
`maxDomains` | how many mail domains this admin can create | `maxDomains=5`
`maxQuota` | how much mailbox quota this admin can create. Quota is shared by all domains created/managed by this admin. Must be used with parameter `quotaUnit`. Sample: 10TB, 20GB, 100MB.| `maxQuota=2`
`quotaUnit` | Quota unit used by `maxQuota` parameter. Must be used with parameter `maxQuota`. Possible values: TB, GB, MB. | `quotaUnit=TB`
`maxUsers` | how many mail users this admin can create. It's shared by all domains created/managed by this admin. | `maxUsers=100`
`maxAliases` | how many mail aliases this admin can create. It's shared by all domains created/managed by this admin. | `maxAliases=200`
`maxLists` | how many mailing lists this admin can create. It's shared by all domains created/managed by this admin. | `maxLists=300`
</div>
!!! api "`POST`{: .post } `/api/verify_password/admin/<mail>`{: .url } `Verify given (plain) password against the one stored in SQL/LDAP`{: .comment } `upcoming`{: .upcoming } `Parameters`{: .has_params} "
<div class="params params_admin">
@ -179,7 +205,7 @@ Notes:
Password verification is limited to global domain admin.
Parameter Name | Summary | Sample Usage
Parameter | Summary | Sample Usage
--- |--- |---
`password` | Plain password | `password=u0tBF82cIV@vi8Gme`
@ -192,7 +218,7 @@ Notes:
<div class="params params_user">
Parameter Name | Summary | Sample Usage
Parameter | Summary | Sample Usage
--- |--- |---
`name` | Display name | `name=My New Name`
`password` | Password| `password=AsTr0ng@`
@ -206,7 +232,7 @@ Notes:
<div class="params params_user">
Parameter Name | Summary | Sample Usage
Parameter | Summary | Sample Usage
--- |--- |---
`name` | Display name | `name=My New Name`
`password` | Password | `password=u0tBF82cIV@vi8Gme`
@ -227,7 +253,7 @@ Notes:
<div class="params">
Parameter Name | Comment
Parameter | Comment
--- |---
`accountStatus` | Account status. Possible value is: active, disabled.
`password` | Password
@ -244,7 +270,7 @@ Notes:
Password verification is limited to global domain admin.
Parameter Name | Summary | Sample Usage
Parameter | Summary | Sample Usage
--- |--- |---
`password` | Plain password | `password=u0tBF82cIV@vi8Gme`
@ -261,7 +287,7 @@ Notes:
!!! api "`POST`{: .post } `/api/maillist/<mail>`{: .url } `Create a new mailing list`{: .comment } `upcoming`{: .upcoming } `Parameters`{: .has_params }"
<div class="params">
Parameter Name | Summary | Sample Usage
Parameter | Summary | Sample Usage
--- |--- |---
`name` | Display name | `name=My List Name`
`accessPolicy` | Defines who can send email to this mail alias account | `accessPolicy=public`
@ -274,7 +300,7 @@ Notes:
<div class="params">
Parameter Name | Summary | Sample Usage
Parameter | Summary | Sample Usage
--- |--- |---
`name` | display name | `name=My List Name`
`accessPolicy` | Defines who can send email to this mailing list | `accessPolicy=public`
@ -291,7 +317,7 @@ Notes:
<div class="params">
Parameter Name | Summary | Sample Usage
Parameter | Summary | Sample Usage
--- |--- |---
`name` | Display name | `name=My List Name`
`accessPolicy` | Defines who can send email to this mail alias account | `accessPolicy=public`
@ -312,7 +338,7 @@ Notes:
`accessPolicy` for mail alias account is only available for SQL backends.
Parameter Name | Summary | Sample Usage
Parameter | Summary | Sample Usage
--- |--- |---
`name` | Display name | `name=My List Name`
`accessPolicy` | Defines who can send email to this mail alias account | `accessPolicy=public`
@ -342,7 +368,7 @@ Notes:
> Per-user policy has the highest priority, then per-domain policy, then global policy.
Parameter Name | Summary | Sample Usage
Parameter | Summary | Sample Usage
--- |--- |---
`bypass_spam_checks` | Bypass spam checks | `bypass_spam_checks=yes` (default is `no`)
`bypass_virus_checks` | Bypass virus checks | `bypass_virus_checks=yes` (default is `no`)
@ -377,7 +403,7 @@ Notes:
Parameters available for global, per-domain, per-user throttle settings.
Parameter Name | Summary | Sample Usage
Parameter | Summary | Sample Usage
--- |--- |---
`period` * | Period of time, in seconds | `period=3600` (one hour)
`msg_size` | Max size of single email, in bytes | `msg_size=10485760` (10 MB)

View File

@ -114,7 +114,7 @@ RESTFUL_API_CLIENTS = ['172.16.244.1', ...]
<table>
<thead>
<tr>
<th>Parameter Name</th>
<th>Parameter</th>
<th>Summary</th>
<th>Sample Usage</th>
</tr>
@ -193,7 +193,7 @@ RESTFUL_API_CLIENTS = ['172.16.244.1', ...]
<table>
<thead>
<tr>
<th>Parameter Name</th>
<th>Parameter</th>
<th>Summary</th>
<th>Sample Usage</th>
</tr>
@ -299,7 +299,7 @@ RESTFUL_API_CLIENTS = ['172.16.244.1', ...]
<table>
<thead>
<tr>
<th>Parameter Name</th>
<th>Parameter</th>
<th>Summary</th>
<th>Sample Usage</th>
</tr>
@ -337,7 +337,7 @@ to be a domain admin.</p>
<table>
<thead>
<tr>
<th>Parameter Name</th>
<th>Parameter</th>
<th>Summary</th>
<th>Sample Usage</th>
</tr>
@ -381,7 +381,7 @@ to be a domain admin.</p>
<table>
<thead>
<tr>
<th>Parameter Name</th>
<th>Parameter</th>
<th>Summary</th>
<th>Sample Usage</th>
</tr>
@ -398,14 +398,19 @@ to be a domain admin.</p>
<td><code>password=AsTr0ng@</code></td>
</tr>
<tr>
<td><code>accountStatus</code></td>
<td>Enable or disable account. Possible values: <code>active</code>, <code>disabled</code>.</td>
<td><code>accountStatus=active</code></td>
</tr>
<tr>
<td><code>language</code></td>
<td>Preferred language of iRedAdmin web UI</td>
<td><code>language=en_US</code></td>
</tr>
<tr>
<td><code>domainGlobalAdmin</code></td>
<td><code>isGlobalAdmin</code></td>
<td>Mark this admin as global admin</td>
<td><code>domainGlobalAdmin=yes</code></td>
<td><code>isGlobalAdmin=yes</code></td>
</tr>
</tbody>
</table>
@ -414,6 +419,91 @@ to be a domain admin.</p>
</div>
<div class="admonition api">
<p class="admonition-title"><code class="delete">DELETE</code> <code class="url">/api/admin/&lt;mail&gt;</code> <code class="comment">Delete an existing domain admin</code> <code class="upcoming">upcoming</code></p>
</div>
<div class="admonition api">
<p class="admonition-title"><code class="put">PUT</code> <code class="url">/api/admin/&lt;mail&gt;</code> <code class="comment">Update profile of an existing domain admin</code> <code class="upcoming">upcoming</code> <code class="has_params">Parameters</code></p>
<div class="params params_admin">
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Summary</th>
<th>Sample Usage</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>name</code></td>
<td>Display name</td>
<td><code>name=My Admin Name</code></td>
</tr>
<tr>
<td><code>password</code></td>
<td>Password</td>
<td><code>password=AsTr0ng@</code></td>
</tr>
<tr>
<td><code>accountStatus</code></td>
<td>Enable or disable account. Possible values: <code>active</code>, <code>disabled</code>.</td>
<td><code>accountStatus=active</code></td>
</tr>
<tr>
<td><code>language</code></td>
<td>Preferred language of iRedAdmin web UI</td>
<td><code>language=en_US</code></td>
</tr>
<tr>
<td><code>isGlobalAdmin</code></td>
<td>Mark this admin as global admin</td>
<td><code>isGlobalAdmin=yes</code></td>
</tr>
</tbody>
</table>
<p>Below parameters are used by normal domain admin. With <code>isGlobalAdmin=yes</code>, they will be removed.</p>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Summary</th>
<th>Sample Usage</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>maxDomains</code></td>
<td>how many mail domains this admin can create</td>
<td><code>maxDomains=5</code></td>
</tr>
<tr>
<td><code>maxQuota</code></td>
<td>how much mailbox quota this admin can create. Quota is shared by all domains created/managed by this admin. Must be used with parameter <code>quotaUnit</code>. Sample: 10TB, 20GB, 100MB.</td>
<td><code>maxQuota=2</code></td>
</tr>
<tr>
<td><code>quotaUnit</code></td>
<td>Quota unit used by <code>maxQuota</code> parameter. Must be used with parameter <code>maxQuota</code>. Possible values: TB, GB, MB.</td>
<td><code>quotaUnit=TB</code></td>
</tr>
<tr>
<td><code>maxUsers</code></td>
<td>how many mail users this admin can create. It's shared by all domains created/managed by this admin.</td>
<td><code>maxUsers=100</code></td>
</tr>
<tr>
<td><code>maxAliases</code></td>
<td>how many mail aliases this admin can create. It's shared by all domains created/managed by this admin.</td>
<td><code>maxAliases=200</code></td>
</tr>
<tr>
<td><code>maxLists</code></td>
<td>how many mailing lists this admin can create. It's shared by all domains created/managed by this admin.</td>
<td><code>maxLists=300</code></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="admonition api">
<p class="admonition-title"><code class="post">POST</code> <code class="url">/api/verify_password/admin/&lt;mail&gt;</code> <code class="comment">Verify given (plain) password against the one stored in SQL/LDAP</code> <code class="upcoming">upcoming</code> <code class="has_params">Parameters</code> </p>
@ -426,7 +516,7 @@ to be a domain admin.</p>
<table>
<thead>
<tr>
<th>Parameter Name</th>
<th>Parameter</th>
<th>Summary</th>
<th>Sample Usage</th>
</tr>
@ -453,7 +543,7 @@ to be a domain admin.</p>
<table>
<thead>
<tr>
<th>Parameter Name</th>
<th>Parameter</th>
<th>Summary</th>
<th>Sample Usage</th>
</tr>
@ -494,7 +584,7 @@ to be a domain admin.</p>
<table>
<thead>
<tr>
<th>Parameter Name</th>
<th>Parameter</th>
<th>Summary</th>
<th>Sample Usage</th>
</tr>
@ -570,7 +660,7 @@ to be a domain admin.</p>
<table>
<thead>
<tr>
<th>Parameter Name</th>
<th>Parameter</th>
<th>Comment</th>
</tr>
</thead>
@ -607,7 +697,7 @@ to be a domain admin.</p>
<table>
<thead>
<tr>
<th>Parameter Name</th>
<th>Parameter</th>
<th>Summary</th>
<th>Sample Usage</th>
</tr>
@ -639,7 +729,7 @@ please use mail alias account as mailing list.</p>
<table>
<thead>
<tr>
<th>Parameter Name</th>
<th>Parameter</th>
<th>Summary</th>
<th>Sample Usage</th>
</tr>
@ -675,7 +765,7 @@ please use mail alias account as mailing list.</p>
<table>
<thead>
<tr>
<th>Parameter Name</th>
<th>Parameter</th>
<th>Summary</th>
<th>Sample Usage</th>
</tr>
@ -722,7 +812,7 @@ please use mail alias account as mailing list.</p>
<table>
<thead>
<tr>
<th>Parameter Name</th>
<th>Parameter</th>
<th>Summary</th>
<th>Sample Usage</th>
</tr>
@ -766,7 +856,7 @@ please use mail alias account as mailing list.</p>
<table>
<thead>
<tr>
<th>Parameter Name</th>
<th>Parameter</th>
<th>Summary</th>
<th>Sample Usage</th>
</tr>
@ -841,7 +931,7 @@ please use mail alias account as mailing list.</p>
<table>
<thead>
<tr>
<th>Parameter Name</th>
<th>Parameter</th>
<th>Summary</th>
<th>Sample Usage</th>
</tr>
@ -949,7 +1039,7 @@ please use mail alias account as mailing list.</p>
<table>
<thead>
<tr>
<th>Parameter Name</th>
<th>Parameter</th>
<th>Summary</th>
<th>Sample Usage</th>
</tr>