User Tools

Site Tools

Translations of this page:

plugin:restapi

REST API

Compatible with version

3.2.3 and later

plugin Rest API for phpList

Repository
Source

Tagged with api, rest

Purpose

It provides a REST API interface to phpList.

This is the official continuation of the original REST API plugin by Andreas Ek

If you use this plugin, please sign up to the phpList RestAPI list so that you can be informed of changes.

IMPORTANT: If you have used the API previous to November 2015, you will need to be careful to upgrade to the latest version. A lot has changed in the API, and if you make calls on the old API, they are likely to fail.

The previous version is available on https://github.com/phpList/phplist-plugin-restapi/archive/stable.zip

Installation

Install the plugin using the Plugin Manager and the download URL above, which points to latest version of the plugin. Refer to Plugins on how to install plugins manually.

Once the plugin is installed, three plugins will list in the “Manage Plugins” page.

The current plugin is the one called restapi and you need to switch it on to use it.

The other two plugins are unstable and in development

Examples/Usage

The plugin is CI tested on https://travis-ci.org/phpList/phplist-plugin-restapi

The phpUnit tests give examples of how to use the API

Further examples in PHP, and an example Client class, can be found at https://github.com/michield/phplist-restapi-client. Please fork and update the client.

Configuration

The plugin will add the following entries to the Settings page of phpList

  1. Maximum number of RESTAPI requests per minute - will restrict the use of the API
  2. Require SSL on Rest API calls - will enforce the URL to be on SSL. This only works if your phpList installation can be accessed via SSL
  3. IP Address that is allowed to access the API - if you only access the phpList system from one IP address, you can use this to prevent unauthorised access attempts
  4. Require the secret code for Rest API calls - Set this to YES to require the API calls to include the secret (Secret for remote processing). You will need to update your client class to include the secret.

Development

The current state of the plugin allows for simple calls to manipulate lists, subscribers, campaigns and templates.

Future developments will go towards a joint effort of the phpList4 project and the phpList RESTAPI plugin. Work on this has already started in the “restapi2” part of this plugin, but is still in progress.

Change Log

  • 2015/11/19 Version 3, Major rewrite, not backwards compatible.
  • 2014/05/30 Initial release

Known Bugs and Issues

  1. The API cannot handle Subscriber Attributes at the moment
  2. Certain actions in the API need to be passed through other plugins
plugin/restapi.txt · Last modified: 2016/11/22 15:20 by samtuke

Resources
Contact Us

e: info@phplist.com

Boring Bit

phpList is a registered limited company

UK Company No. 07582966

VAT Registration 122 0788 37

© phpList 2013