Skip to content

Commit eb5dc38

Browse files
committedNov 18, 2015
update main info
1 parent efe2e2e commit eb5dc38

File tree

1 file changed

+23
-10
lines changed

1 file changed

+23
-10
lines changed
 

‎plugins/restapi/main.php

+23-10
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
defined('PHPLISTINIT') || die;
66

7-
include 'includes/common.php';
7+
include_once 'includes/common.php';
88

99
$plugin = $GLOBALS['plugins'][$_GET['pi']];
1010

@@ -14,31 +14,44 @@
1414

1515
<h1>RESTAPI</h1>
1616

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>
2021

2122
<p>
2223
<h2>Commands</h2>
2324
To discover all commands to this API just make a GET request or click here:<br/>
2425
<a href="<?php echo $url; ?>">phpList API Command Reference list</a><br/>
2526
The documentation is generated in realtime.
2627
</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+
2733
<p>
2834
<h2>Access</h2>
2935
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/>
3137
RESTAPI-Url to this installation:<br/>
3238
<a href="<?php echo $url; ?>"><?php echo $url; ?></a>
3339
</p>
3440
<p>
3541
First login to phpList with method POST and body parameters "login" and "password".<br/>
3642
</p>
3743
<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>
4255
</p>
4356

4457
<p>
@@ -49,7 +62,7 @@
4962

5063
<p>
5164
<h2>Issues</h2>
52-
All issues regarding the RESTAPI is handled at Github!
65+
All issues regarding the RESTAPI are handled at Github!
5366
<a href="https://github.com/phpList/phplist-plugin-restapi/issues">https://github.com/phpList/phplist-plugin-restapi/issues</a>
5467
</p>
5568

0 commit comments

Comments
 (0)
Please sign in to comment.