|
4 | 4 |
|
5 | 5 | defined('PHPLISTINIT') || die;
|
6 | 6 |
|
7 |
| -include 'includes/common.php'; |
| 7 | +include_once 'includes/common.php'; |
8 | 8 |
|
9 | 9 | $plugin = $GLOBALS['plugins'][$_GET['pi']];
|
10 | 10 |
|
|
14 | 14 |
|
15 | 15 | <h1>RESTAPI</h1>
|
16 | 16 |
|
17 |
| - <h2>Version 0.2.5</h2> |
18 |
| - <p>The plugin provides a REST API to phpList.<br/> |
19 |
| - Development by Flowcom AB, Andreas Ek (<a href="https://twitter.com/ekandreas">@EkAndreas</a>)</p> |
| 17 | + <h2>Version <?=$plugin->version?></h2> |
| 18 | + <p>This plugin provides a REST API to phpList.<br/> |
| 19 | + Development by Michiel Dethmers, phpList Ltd <br/> |
| 20 | + Based on work from Andreas Ek (<a href="https://twitter.com/ekandreas">@EkAndreas</a>)</p> |
20 | 21 |
|
21 | 22 | <p>
|
22 | 23 | <h2>Commands</h2>
|
23 | 24 | To discover all commands to this API just make a GET request or click here:<br/>
|
24 | 25 | <a href="<?php echo $url; ?>">phpList API Command Reference list</a><br/>
|
25 | 26 | The documentation is generated in realtime.
|
26 | 27 | </p>
|
| 28 | + <p> |
| 29 | + <h2>Example code</h2> |
| 30 | + To find example code for using the Rest API go to <a href="https://github.com/michield/phplist-restapi-client">https://github.com/michield/phplist-restapi-client</a> |
| 31 | + </p> |
| 32 | + |
27 | 33 | <p>
|
28 | 34 | <h2>Access</h2>
|
29 | 35 | Autentication required as admin in phpList.<br/>
|
30 |
| - All requests to the RESTAPI is made by method POST.<br/> |
| 36 | + All requests to the RESTAPI are made by method POST.<br/> |
31 | 37 | RESTAPI-Url to this installation:<br/>
|
32 | 38 | <a href="<?php echo $url; ?>"><?php echo $url; ?></a>
|
33 | 39 | </p>
|
34 | 40 | <p>
|
35 | 41 | First login to phpList with method POST and body parameters "login" and "password".<br/>
|
36 | 42 | </p>
|
37 | 43 | <p>
|
38 |
| - <h2>Client</h2> |
39 |
| - To try the RESTAPI, please use a client like CocaRestClient or equivalent!<br/> |
40 |
| - There is an example class in restapi-test/phplist_restapi_helper.php if you like to try it in PHP.<br/> |
41 |
| - For examples check commands in restapi-test/main.php |
| 44 | + <h2>Security</h2> |
| 45 | + <p>In the phpList <strong>Settings</strong> you can set various options to increase API security: |
| 46 | + <ul> |
| 47 | + <li>Require SSL on Rest API calls<br/> |
| 48 | + This is only useful when you run phpList on an HTTPS URL (recommended). |
| 49 | + </li> |
| 50 | + <li>IP Address that is allowed to access the API<br/> |
| 51 | + If you always access the API from the same IP address, use this option.</li> |
| 52 | + <li>Require the secret code for Rest API calls<br/> |
| 53 | + You will need to include the remote processing secret in all calls. See the example code.</li> |
| 54 | + </ul></p> |
42 | 55 | </p>
|
43 | 56 |
|
44 | 57 | <p>
|
|
49 | 62 |
|
50 | 63 | <p>
|
51 | 64 | <h2>Issues</h2>
|
52 |
| - All issues regarding the RESTAPI is handled at Github! |
| 65 | + All issues regarding the RESTAPI are handled at Github! |
53 | 66 | <a href="https://github.com/phpList/phplist-plugin-restapi/issues">https://github.com/phpList/phplist-plugin-restapi/issues</a>
|
54 | 67 | </p>
|
55 | 68 |
|
0 commit comments