Typo in iRedAdmin-Pro API doc.
This commit is contained in:
parent
280c345beb
commit
c369e75101
|
@ -22,13 +22,6 @@ iRedAdmin-Pro RESTful API will return message in JSON format.
|
||||||
|
|
||||||
## Enable RESTful API
|
## Enable RESTful API
|
||||||
|
|
||||||
!!! note "iRedAdmin-Pro config file location"
|
|
||||||
|
|
||||||
* on RHEL/CentOS, it's `/var/www/iredadmin/settings.py`.
|
|
||||||
* on Debian/Ubuntu, it's `/opt/www/iredadmin/settings.py` (in recent iRedMail releases) or `/usr/share/apache2/iredadmin/settings.py` (in old iRedMail releases).
|
|
||||||
* on FreeBSD, it's `/usr/local/www/iredadmin/settings.py`.
|
|
||||||
* on OpenBSD, it's `/var/www/iredadmin/settings.py`.
|
|
||||||
|
|
||||||
RESTful API is disabled by default, to enable it, please add setting below in
|
RESTful API is disabled by default, to enable it, please add setting below in
|
||||||
iRedAdmin-Pro config file `settings.py`:
|
iRedAdmin-Pro config file `settings.py`:
|
||||||
|
|
||||||
|
@ -36,6 +29,16 @@ iRedAdmin-Pro config file `settings.py`:
|
||||||
ENABLE_RESTFUL_API = True
|
ENABLE_RESTFUL_API = True
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Restarting Apache or uwsgi (if you're running Nginx) is required after changed
|
||||||
|
iRedAdmin config file.
|
||||||
|
|
||||||
|
!!! note "iRedAdmin-Pro config file location"
|
||||||
|
|
||||||
|
* on RHEL/CentOS, it's `/var/www/iredadmin/settings.py`.
|
||||||
|
* on Debian/Ubuntu, it's `/opt/www/iredadmin/settings.py` (in recent iRedMail releases) or `/usr/share/apache2/iredadmin/settings.py` (in old iRedMail releases).
|
||||||
|
* on FreeBSD, it's `/usr/local/www/iredadmin/settings.py`.
|
||||||
|
* on OpenBSD, it's `/var/www/iredadmin/settings.py`.
|
||||||
|
|
||||||
To restrict API access to few IP addresses, please also add settings below in
|
To restrict API access to few IP addresses, please also add settings below in
|
||||||
iRedAdmin-Pro config file:
|
iRedAdmin-Pro config file:
|
||||||
|
|
||||||
|
@ -47,8 +50,6 @@ RESTRICT_API_ACCESS = True
|
||||||
RESTFUL_API_CLIENTS = ['172.16.244.1', ...]
|
RESTFUL_API_CLIENTS = ['172.16.244.1', ...]
|
||||||
```
|
```
|
||||||
|
|
||||||
Restarting Apache or uwsgi (if you're running Nginx) is required.
|
|
||||||
|
|
||||||
## Sample code to interact with iRedAdmin-Pro RESTful API
|
## Sample code to interact with iRedAdmin-Pro RESTful API
|
||||||
|
|
||||||
* [iRedAdmin-Pro RESTful API (interact with `curl`)](./iredadmin-pro.restful.api.curl.html)
|
* [iRedAdmin-Pro RESTful API (interact with `curl`)](./iredadmin-pro.restful.api.curl.html)
|
||||||
|
|
|
@ -22,13 +22,6 @@ iRedAdmin-Pro RESTful API will return message in JSON format.
|
||||||
|
|
||||||
## Enable RESTful API
|
## Enable RESTful API
|
||||||
|
|
||||||
!!! note "iRedAdmin-Pro config file location"
|
|
||||||
|
|
||||||
* on RHEL/CentOS, it's `/var/www/iredadmin/settings.py`.
|
|
||||||
* on Debian/Ubuntu, it's `/opt/www/iredadmin/settings.py` (in recent iRedMail releases) or `/usr/share/apache2/iredadmin/settings.py` (in old iRedMail releases).
|
|
||||||
* on FreeBSD, it's `/usr/local/www/iredadmin/settings.py`.
|
|
||||||
* on OpenBSD, it's `/var/www/iredadmin/settings.py`.
|
|
||||||
|
|
||||||
RESTful API is disabled by default, to enable it, please add setting below in
|
RESTful API is disabled by default, to enable it, please add setting below in
|
||||||
iRedAdmin-Pro config file `settings.py`:
|
iRedAdmin-Pro config file `settings.py`:
|
||||||
|
|
||||||
|
@ -36,6 +29,16 @@ iRedAdmin-Pro config file `settings.py`:
|
||||||
ENABLE_RESTFUL_API = True
|
ENABLE_RESTFUL_API = True
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Restarting Apache or uwsgi (if you're running Nginx) is required after changed
|
||||||
|
iRedAdmin config file.
|
||||||
|
|
||||||
|
!!! note "iRedAdmin-Pro config file location"
|
||||||
|
|
||||||
|
* on RHEL/CentOS, it's `/var/www/iredadmin/settings.py`.
|
||||||
|
* on Debian/Ubuntu, it's `/opt/www/iredadmin/settings.py` (in recent iRedMail releases) or `/usr/share/apache2/iredadmin/settings.py` (in old iRedMail releases).
|
||||||
|
* on FreeBSD, it's `/usr/local/www/iredadmin/settings.py`.
|
||||||
|
* on OpenBSD, it's `/var/www/iredadmin/settings.py`.
|
||||||
|
|
||||||
To restrict API access to few IP addresses, please also add settings below in
|
To restrict API access to few IP addresses, please also add settings below in
|
||||||
iRedAdmin-Pro config file:
|
iRedAdmin-Pro config file:
|
||||||
|
|
||||||
|
@ -47,8 +50,6 @@ RESTRICT_API_ACCESS = True
|
||||||
RESTFUL_API_CLIENTS = ['172.16.244.1', ...]
|
RESTFUL_API_CLIENTS = ['172.16.244.1', ...]
|
||||||
```
|
```
|
||||||
|
|
||||||
Restarting Apache or uwsgi (if you're running Nginx) is required.
|
|
||||||
|
|
||||||
## Sample code to interact with iRedAdmin-Pro RESTful API
|
## Sample code to interact with iRedAdmin-Pro RESTful API
|
||||||
|
|
||||||
* [iRedAdmin-Pro RESTful API (interact with `curl`)](./iredadmin-pro.restful.api.curl.html)
|
* [iRedAdmin-Pro RESTful API (interact with `curl`)](./iredadmin-pro.restful.api.curl.html)
|
||||||
|
|
|
@ -69,6 +69,13 @@
|
||||||
<li>If operation failed, it returns JSON data: <code>{'_success': false, '_msg': '<error_reason>'}</code>.</li>
|
<li>If operation failed, it returns JSON data: <code>{'_success': false, '_msg': '<error_reason>'}</code>.</li>
|
||||||
</ul>
|
</ul>
|
||||||
<h2 id="enable-restful-api">Enable RESTful API</h2>
|
<h2 id="enable-restful-api">Enable RESTful API</h2>
|
||||||
|
<p>RESTful API is disabled by default, to enable it, please add setting below in
|
||||||
|
iRedAdmin-Pro config file <code>settings.py</code>:</p>
|
||||||
|
<pre><code>ENABLE_RESTFUL_API = True
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<p>Restarting Apache or uwsgi (if you're running Nginx) is required after changed
|
||||||
|
iRedAdmin config file.</p>
|
||||||
<div class="admonition note">
|
<div class="admonition note">
|
||||||
<p class="admonition-title">iRedAdmin-Pro config file location</p>
|
<p class="admonition-title">iRedAdmin-Pro config file location</p>
|
||||||
<ul>
|
<ul>
|
||||||
|
@ -78,11 +85,6 @@
|
||||||
<li>on OpenBSD, it's <code>/var/www/iredadmin/settings.py</code>.</li>
|
<li>on OpenBSD, it's <code>/var/www/iredadmin/settings.py</code>.</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<p>RESTful API is disabled by default, to enable it, please add setting below in
|
|
||||||
iRedAdmin-Pro config file <code>settings.py</code>:</p>
|
|
||||||
<pre><code>ENABLE_RESTFUL_API = True
|
|
||||||
</code></pre>
|
|
||||||
|
|
||||||
<p>To restrict API access to few IP addresses, please also add settings below in
|
<p>To restrict API access to few IP addresses, please also add settings below in
|
||||||
iRedAdmin-Pro config file:</p>
|
iRedAdmin-Pro config file:</p>
|
||||||
<pre><code># Enable restriction
|
<pre><code># Enable restriction
|
||||||
|
@ -92,7 +94,6 @@ RESTRICT_API_ACCESS = True
|
||||||
RESTFUL_API_CLIENTS = ['172.16.244.1', ...]
|
RESTFUL_API_CLIENTS = ['172.16.244.1', ...]
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
|
||||||
<p>Restarting Apache or uwsgi (if you're running Nginx) is required.</p>
|
|
||||||
<h2 id="sample-code-to-interact-with-iredadmin-pro-restful-api">Sample code to interact with iRedAdmin-Pro RESTful API</h2>
|
<h2 id="sample-code-to-interact-with-iredadmin-pro-restful-api">Sample code to interact with iRedAdmin-Pro RESTful API</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="./iredadmin-pro.restful.api.curl.html">iRedAdmin-Pro RESTful API (interact with <code>curl</code>)</a></li>
|
<li><a href="./iredadmin-pro.restful.api.curl.html">iRedAdmin-Pro RESTful API (interact with <code>curl</code>)</a></li>
|
||||||
|
|
|
@ -70,6 +70,13 @@
|
||||||
<li>If operation failed, it returns JSON data: <code>{'_success': false, '_msg': '<error_reason>'}</code>.</li>
|
<li>If operation failed, it returns JSON data: <code>{'_success': false, '_msg': '<error_reason>'}</code>.</li>
|
||||||
</ul>
|
</ul>
|
||||||
<h2 id="enable-restful-api">Enable RESTful API</h2>
|
<h2 id="enable-restful-api">Enable RESTful API</h2>
|
||||||
|
<p>RESTful API is disabled by default, to enable it, please add setting below in
|
||||||
|
iRedAdmin-Pro config file <code>settings.py</code>:</p>
|
||||||
|
<pre><code>ENABLE_RESTFUL_API = True
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<p>Restarting Apache or uwsgi (if you're running Nginx) is required after changed
|
||||||
|
iRedAdmin config file.</p>
|
||||||
<div class="admonition note">
|
<div class="admonition note">
|
||||||
<p class="admonition-title">iRedAdmin-Pro config file location</p>
|
<p class="admonition-title">iRedAdmin-Pro config file location</p>
|
||||||
<ul>
|
<ul>
|
||||||
|
@ -79,11 +86,6 @@
|
||||||
<li>on OpenBSD, it's <code>/var/www/iredadmin/settings.py</code>.</li>
|
<li>on OpenBSD, it's <code>/var/www/iredadmin/settings.py</code>.</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<p>RESTful API is disabled by default, to enable it, please add setting below in
|
|
||||||
iRedAdmin-Pro config file <code>settings.py</code>:</p>
|
|
||||||
<pre><code>ENABLE_RESTFUL_API = True
|
|
||||||
</code></pre>
|
|
||||||
|
|
||||||
<p>To restrict API access to few IP addresses, please also add settings below in
|
<p>To restrict API access to few IP addresses, please also add settings below in
|
||||||
iRedAdmin-Pro config file:</p>
|
iRedAdmin-Pro config file:</p>
|
||||||
<pre><code># Enable restriction
|
<pre><code># Enable restriction
|
||||||
|
@ -93,7 +95,6 @@ RESTRICT_API_ACCESS = True
|
||||||
RESTFUL_API_CLIENTS = ['172.16.244.1', ...]
|
RESTFUL_API_CLIENTS = ['172.16.244.1', ...]
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
|
||||||
<p>Restarting Apache or uwsgi (if you're running Nginx) is required.</p>
|
|
||||||
<h2 id="sample-code-to-interact-with-iredadmin-pro-restful-api">Sample code to interact with iRedAdmin-Pro RESTful API</h2>
|
<h2 id="sample-code-to-interact-with-iredadmin-pro-restful-api">Sample code to interact with iRedAdmin-Pro RESTful API</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="./iredadmin-pro.restful.api.curl.html">iRedAdmin-Pro RESTful API (interact with <code>curl</code>)</a></li>
|
<li><a href="./iredadmin-pro.restful.api.curl.html">iRedAdmin-Pro RESTful API (interact with <code>curl</code>)</a></li>
|
||||||
|
|
Loading…
Reference in New Issue