Open API is a front-end API for ExpressionEngine that provides authentication and CRUD functionality to the content and data in the CMS.

GitHub

API Documentation

EEUK 2013 Presentation Slides

* Please note that Open API is in beta and therefore not ready for use in production. For a commercial solution please use Entry API.

Installation

Download and unzip Open API, then follow the simple steps below:

  1. Upload the system/expressionengine/third_party/open_api` folder
  2. Enable the Open API extension (Control Panel > Add-Ons > Extensions > Enable)
  3. Open the Open API settings (Control Panel > Add-Ons > Extensions > Open API) and set the API trigger

Updating

Download and unzip the latest version of Open API, then follow the steps below:

  1. Overwrite the _system/expressionengine/third_party/openapi`` folder

Settings

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

Universal API Key
An API key that allows read access to all restricted channels

API Method Access
Set access for each API read method (write methods require member authentication and for the member to have the correct permissions set in EE)

Channel Access
Set read access for each channel (used with get_channel_entry and get_channel_entries methods))

Access Options
Private – no read access
Public – read access for anyone
​Restricted – read access only for selected member groups or specified API keys (one per line)

API Documentation

Full API documentation with all of the available methods can be found at http://docs.eeopenapi.apiary.io/

Developers

The Open API Library can be used directly by other third-party add-ons. Load the library 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 available methods as follows:

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

Extension Hooks

The following extension hooks are available:

open_api_authenticate_member_start ( int $member_id )
Allows you to modify the member id before authentication

open_api_authenticate_member_success ( int $member_id )
Allows additional processing after successful authentication

open_api_get_channel_start ( array $vars )
Allows you to modify the variables before retrieval

open_api_get_channel_end ( array $data )
Allows you to modify the retrieved data before the response is sent

open_api_get_channels_start ( array $vars )
Allows you to modify the variables before retrieval

open_api_get_channels_end ( array $data )
Allows you to modify the retrieved data before the response is sent

open_api_get_channel_entry_start ( array $vars )
Allows you to modify the variables before retrieval

open_api_get_channel_entry_end ( array $data )
Allows you to modify the retrieved data before the response is sent

open_api_get_channel_entries_start ( array $vars )
Allows you to modify the variables before retrieval

open_api_get_channel_entries_end ( array $data )
Allows you to modify the retrieved data before the response is sent

open_api_get_category_start ( array $vars )
Allows you to modify the variables before retrieval

open_api_get_category_end ( array $data )
Allows you to modify the retrieved data before the response is sent

open_api_get_categories_start ( array $vars )
Allows you to modify the variables before retrieval

open_api_get_categories_end ( array $data )
Allows you to modify the retrieved data before the response is sent

open_api_get_categories_by_group_start ( array $vars )
Allows you to modify the variables before retrieval

open_api_get_categories_by_group_end ( array $data )
Allows you to modify the retrieved data before the response is sent

open_api_get_categories_by_channel_start ( array $vars )
Allows you to modify the variables before retrieval

open_api_get_categories_by_channel_end ( array $data )
Allows you to modify the retrieved data before the response is sent

open_api_get_category_group_start ( array $vars )
Allows you to modify the variables before retrieval

open_api_get_category_group_end ( array $data )
Allows you to modify the retrieved data before the response is sent

open_api_get_category_groups_start ( array $vars )
Allows you to modify the variables before retrieval

open_api_get_category_groups_end ( array $data )
Allows you to modify the retrieved data before the response is sent

open_api_get_member_start ( array $vars )
Allows you to modify the variables before retrieval

open_api_get_member_end ( array $data )
Allows you to modify the retrieved data before the response is sent

open_api_get_members_start ( array $vars )
Allows you to modify the variables before retrieval

open_api_get_members_end ( array $data )
Allows you to modify the retrieved data before the response is sent

open_api_get_member_group_start ( array $vars )
Allows you to modify the variables before retrieval

open_api_get_member_group_end ( array $data )
Allows you to modify the retrieved data before the response is sent

open_api_get_member_groups_start ( array $vars )
Allows you to modify the variables before retrieval

open_api_get_member_groups_end ( array $data )
Allows you to modify the retrieved data before the response is sent

Support

Get support by creating a new issue here.