Open API

Front-end CRUD API for ExpressionEngine.

Open API is a front-end API for Expres­sion­En­gine that provides authen­tic­a­tion and CRUD func­tion­al­ity to the con­tent and data in the CMS.

API Doc­u­ment­a­tion

EEUK & Open API Revealed

For an act­ively developed com­mer­cial solu­tion, please use Web­ser­vice.

Install­a­tion #

Down­load and unzip Open API, then fol­low the simple steps below:

  1. Upload the system/expressionengine/third_party/open_api folder
  2. Enable the Open API exten­sion (Con­trol Pan­el → Add-Ons → Exten­sions → Enable)
  3. Open the Open API set­tings (Con­trol Pan­el → Add-Ons → Exten­sions → Open API) and set the API trigger

Updat­ing #

Down­load and unzip the latest ver­sion of Open API, then fol­low the steps below:

  1. Over­write the system/expressionengine/third_party/open_api folder

Set­tings #

API Trigger
The word that will trig­ger the API (this must be set in order to access the API)

Uni­ver­sal API Key
An API key that allows read access to all restric­ted channels

API Meth­od Access
Set access for each API read meth­od (write meth­ods require mem­ber authen­tic­a­tion and for the mem­ber to have the cor­rect per­mis­sions set in EE)

Chan­nel Access
Set read access for each chan­nel (used with get_​channel_​entry and get_​channel_​entries methods))

Access Options
Private – no read access
Pub­lic – read access for anyone
Restric­ted – read access only for selec­ted mem­ber groups or spe­cified API keys (one per line)

Settings

API Doc­u­ment­a­tion #

Full API doc­u­ment­a­tion with all of the avail­able meth­ods can be found at http://​docs​.eeopenapi​.api​ary​.io/

Developers #

The Open API Lib­rary can be used dir­ectly by oth­er third-party add-ons. Load the lib­rary as follows:

// load open api library
$this->EE->load->add_package_path(PATH_THIRD.'open_api/');
$this->EE->load->library('Open_api_lib');
$this->EE->load->remove_package_path(PATH_THIRD.'open_api/');

You can then call the avail­able meth­ods as follows:

// create channel
$this->EE->open_api_lib->create_channel();

Exten­sion Hooks #

The fol­low­ing exten­sion hooks are available:

open_api_authenticate_member_start ( int $member_id )
Allows you to modi­fy the mem­ber id before authentication

open_api_authenticate_member_success ( int $member_id )
Allows addi­tion­al pro­cessing after suc­cess­ful authentication

open_api_get_channel_start ( array $vars )
Allows you to modi­fy the vari­ables before retrieval

open_api_get_channel_end ( array $data )
Allows you to modi­fy the retrieved data before the response is sent

open_api_get_channels_start ( array $vars )
Allows you to modi­fy the vari­ables before retrieval

open_api_get_channels_end ( array $data )
Allows you to modi­fy the retrieved data before the response is sent

open_api_get_channel_entry_start ( array $vars )
Allows you to modi­fy the vari­ables before retrieval

open_api_get_channel_entry_end ( array $data )
Allows you to modi­fy the retrieved data before the response is sent

open_api_get_channel_entries_start ( array $vars )
Allows you to modi­fy the vari­ables before retrieval

open_api_get_channel_entries_end ( array $data )
Allows you to modi­fy the retrieved data before the response is sent

open_api_get_category_start ( array $vars )
Allows you to modi­fy the vari­ables before retrieval

open_api_get_category_end ( array $data )
Allows you to modi­fy the retrieved data before the response is sent

open_api_get_categories_start ( array $vars )
Allows you to modi­fy the vari­ables before retrieval

open_api_get_categories_end ( array $data )
Allows you to modi­fy the retrieved data before the response is sent

open_api_get_categories_by_group_start ( array $vars )
Allows you to modi­fy the vari­ables before retrieval

open_api_get_categories_by_group_end ( array $data )
Allows you to modi­fy the retrieved data before the response is sent

open_api_get_categories_by_channel_start ( array $vars )
Allows you to modi­fy the vari­ables before retrieval

open_api_get_categories_by_channel_end ( array $data )
Allows you to modi­fy the retrieved data before the response is sent

open_api_get_category_group_start ( array $vars )
Allows you to modi­fy the vari­ables before retrieval

open_api_get_category_group_end ( array $data )
Allows you to modi­fy the retrieved data before the response is sent

open_api_get_category_groups_start ( array $vars )
Allows you to modi­fy the vari­ables before retrieval

open_api_get_category_groups_end ( array $data )
Allows you to modi­fy the retrieved data before the response is sent

open_api_get_member_start ( array $vars )
Allows you to modi­fy the vari­ables before retrieval

open_api_get_member_end ( array $data )
Allows you to modi­fy the retrieved data before the response is sent

open_api_get_members_start ( array $vars )
Allows you to modi­fy the vari­ables before retrieval

open_api_get_members_end ( array $data )
Allows you to modi­fy the retrieved data before the response is sent

open_api_get_member_group_start ( array $vars )
Allows you to modi­fy the vari­ables before retrieval

open_api_get_member_group_end ( array $data )
Allows you to modi­fy the retrieved data before the response is sent

open_api_get_member_groups_start ( array $vars )
Allows you to modi­fy the vari­ables before retrieval

open_api_get_member_groups_end ( array $data )
Allows you to modi­fy the retrieved data before the response is sent