From 4936cb1b228675f032d0ece65933b25463f15e86 Mon Sep 17 00:00:00 2001 From: Zhang Huangbin Date: Fri, 23 Jul 2021 16:29:43 +0800 Subject: [PATCH] Update iRedAdmin-Pro API doc. --- .../0-iredadmin-pro.restful.api-new.md | 38 +++++++++++++++---- html/iredadmin-pro.restful.api-new.html | 35 ++++++++++++----- 2 files changed, 56 insertions(+), 17 deletions(-) diff --git a/en_US/iredadmin/0-iredadmin-pro.restful.api-new.md b/en_US/iredadmin/0-iredadmin-pro.restful.api-new.md index 25620b9c..9b411b1a 100644 --- a/en_US/iredadmin/0-iredadmin-pro.restful.api-new.md +++ b/en_US/iredadmin/0-iredadmin-pro.restful.api-new.md @@ -4,8 +4,8 @@ !!! attention - * This document is applicable to `iRedAdmin-Pro-SQL-4.4` and - `iRedAdmin-Pro-LDAP-4.5`. If you're running an old release, please + * This document is applicable to `iRedAdmin-Pro-SQL-4.9` and + `iRedAdmin-Pro-LDAP-5.0`. If you're running an old release, please upgrade iRedAdmin-Pro to the latest release, or check [document for old releases](./iredadmin-pro.releases.html). * If you need an API which has not yet been implemented, don't hesitate to @@ -225,7 +225,20 @@ Notes: * This is standalone domain admin account, not mail user with admin privileges. * Only global admin can access these APIs. -!!! api "`GET`{: .get } `/api/admin/`{: .url } `Get profile of an existing domain admin`{: .comment }" +!!! api "`GET`{: .get } `/api/admin/`{: .url } `Get profile of an existing domain admin`{: .comment } `Parameters`{: .has_params }" + +
+ Encrypted account password is not exposed in API request by default, if you + want to expose it for some reason, please add a new line in iRedAdmin-Pro config + file `/opt/www/iredadmin/settings.py` like below, then restart `iredadmin` + service: + + ``` + API_HIDDEN_ADMIN_PROFILES = [] + ``` + +
+ !!! api "`POST`{: .post } `/api/admin/`{: .url } `Create a new domain admin`{: .comment } `Parameters`{: .has_params }"
@@ -297,7 +310,20 @@ Notes: ### Mail User {: .toggle } -!!! api "`GET`{: .get } `/api/user/`{: .url } `Get profile of an existing mail user`{: .comment }" +!!! api "`GET`{: .get } `/api/user/`{: .url } `Get profile of an existing mail user`{: .comment } `Parameters`{: .has_params }" + +
+ Encrypted account password is not exposed in API request by default, if you + want to expose it for some reason, please add a new line in iRedAdmin-Pro config + file `/opt/www/iredadmin/settings.py` like below, then restart `iredadmin` + service: + + ``` + API_HIDDEN_USER_PROFILES = [] + ``` + +
+ !!! api "`POST`{: .post } `/api/user/`{: .url } `Create a new mail user`{: .comment } `Parameters`{: .has_params }"
@@ -693,6 +719,7 @@ Notes: `prefix_spam_in_subject` | Prefix string `[SPAM] ` in mail subject if it's spam | `prefix_spam_in_subject=yes` (default is `no`) `always_insert_x_spam_headers` | Always insert `X-Spam-*` headers in email. It contains spam score and matched SpamAssassin rules. __Don't enable this unless you want to debug spam checking.__ | `always_insert_x_spam_headers=yes` (default is `no`) `spam_score` | Set a preferred spam score, if scanned email has higher score than this one, it will be marked as spam. | `spam_score=4` (defaults to use system setting defined in Amavisd config file.) + `banned_rulenames` | Assign ban rules | `banned_rulenames=ALLOW_MS_WORD,ALLOW_MS_EXCEL`
@@ -810,7 +837,6 @@ Catch-all address | `@.` !!! api "`DELETE`{: .delete } `/api/wblist/inbound/blacklist/`{: .url } `Delete all per-user existing global blacklists for inbound.`{: .comment }" !!! api "`DELETE`{: .delete } `/api/wblist/outbound/whitelist/`{: .url } `Delete all per-user existing global whitelists for outbound.`{: .comment }" !!! api "`DELETE`{: .delete } `/api/wblist/outbound/blacklist/`{: .url } `Delete all per-user existing global whitelists for outbound.`{: .comment }" -!!! api "`PUT`{: .put } `/api/wblist/senderscore/whitelist/`{: .url } `Whitelist given IP address for the senderscore checking. Applied by iRedAPD plugin 'senderscore'`{: .comment }" ### Greylisting {: .toggle } @@ -883,8 +909,6 @@ Catch-all address | `@.`
-!!! api "`PUT`{: .put } `/api/greylisting/global/whitelist/`{: .url } `Whitelist given IP address globally`{: .comment }" - ### Export Accounts {: .toggle } #### LDIF (LDAP backend only) {: .toggle } diff --git a/html/iredadmin-pro.restful.api-new.html b/html/iredadmin-pro.restful.api-new.html index 3fc3f802..9d5b93fa 100644 --- a/html/iredadmin-pro.restful.api-new.html +++ b/html/iredadmin-pro.restful.api-new.html @@ -47,8 +47,8 @@

Attention

    -
  • This document is applicable to iRedAdmin-Pro-SQL-4.4 and - iRedAdmin-Pro-LDAP-4.5. If you're running an old release, please +
  • This document is applicable to iRedAdmin-Pro-SQL-4.9 and + iRedAdmin-Pro-LDAP-5.0. If you're running an old release, please upgrade iRedAdmin-Pro to the latest release, or check document for old releases.
  • If you need an API which has not yet been implemented, don't hesitate to @@ -618,7 +618,15 @@ to be a domain admin.

-

GET /api/admin/<mail> Get profile of an existing domain admin

+

GET /api/admin/<mail> Get profile of an existing domain admin Parameters

+

+Encrypted account password is not exposed in API request by default, if you +want to expose it for some reason, please add a new line in iRedAdmin-Pro config +file /opt/www/iredadmin/settings.py like below, then restart iredadmin +service:

+

API_HIDDEN_ADMIN_PROFILES = []

+
+

POST /api/admin/<mail> Create a new domain admin Parameters

@@ -842,7 +850,15 @@ to be a domain admin.

Mail User

-

GET /api/user/<mail> Get profile of an existing mail user

+

GET /api/user/<mail> Get profile of an existing mail user Parameters

+

+Encrypted account password is not exposed in API request by default, if you +want to expose it for some reason, please add a new line in iRedAdmin-Pro config +file /opt/www/iredadmin/settings.py like below, then restart iredadmin +service:

+

API_HIDDEN_USER_PROFILES = []

+
+

POST /api/user/<mail> Create a new mail user Parameters

@@ -2137,6 +2153,11 @@ to be a domain admin.

Set a preferred spam score, if scanned email has higher score than this one, it will be marked as spam. spam_score=4 (defaults to use system setting defined in Amavisd config file.) + +banned_rulenames +Assign ban rules +banned_rulenames=ALLOW_MS_WORD,ALLOW_MS_EXCEL +
@@ -2438,9 +2459,6 @@ to be a domain admin.

DELETE /api/wblist/outbound/blacklist/<mail> Delete all per-user existing global whitelists for outbound.

-
-

PUT /api/wblist/senderscore/whitelist/<ip> Whitelist given IP address for the senderscore checking. Applied by iRedAPD plugin 'senderscore'

-

Greylisting

GET /api/greylisting/all Get all existing greylisting settings

@@ -2610,9 +2628,6 @@ to be a domain admin.

- -
-

PUT /api/greylisting/global/whitelist/<ip> Whitelist given IP address globally

Export Accounts

LDIF (LDAP backend only)