Related MOStlyREST Wiki Pages
- MOStlyREST Requirements, Installation, and Examples
- MOStlyREST API Registration
- Enabling/Disabling a Users MOStlyREST API Access
- Managing the MOStlyREST API Settings
- MOStlyREST com_rest API Parameters and Explanations
- MOStlyREST com_rest_content API Parameters and Explanations
- MOStlyREST com_rest_stats API Parameters and Explanations
- MOStlyREST Samples and Examples
- MOStlyREST PHPXref Class Documentation
MOStlyREST API Registration
Before developers can begin utilizing a REST enabled MiaCMS site the developer must register for a MOStlyREST API account.
mod_rest ModuleBrilaps has created is a simple module called "mod_rest" that when published makes finding the API registration form simple. It also makes finding the API docs and/or resetting API keys a breeze. To use install, publish the module, and make sure API access has been enabled.
If the mod_rest module has not been installed and/or has not been published then one can manually browse to the registration form with a URL like so:
Note: If the RESTful API interface (com_rest) has not been enabled by the MiaCMS site's administrator then registration and usage of the API will not be available to 3rd party developers! The normal MiaCMS error messages will be displayed (i.e.) "You are not authorized to view this resource".
After submitting the user will be given a chance to confirm the registration details before the final submit.
After successful registration an email is sent to the site's administrator(s). It is up to the site's administrator(s) to review and approve each API request.
MOStlyREST API Registration Approval Process
When a new API account is requested an email will be sent to the site's administrator(s). It is up to the site's administrator(s) to review and approve each API request. In order to review/approve the request the administrator needs to login to Mia's back-end administration interface and select "RESTful API Manager"->"Show API Users" from the Components menu. Upon opening the Management interface a list of API users will be displayed as shown in the screenshot below.
Locate the user in question and click on their name. This will load the edit user interface. The information submitted at the time of registration is displayed. Initially all that is needed is an approval. Should you choose NOT to allow this person to access the API then you can simple leave it alone or delete the request via the REST API Management user list form. If you do decide to enabled access then simply select yes to "Enable API Access" and click save.
If API access is approved the developer is emailed a notification of the approval along with a link to use for activation. Upon successful activation the developer is again emailed, but this time with the actual API application id (appid) needed to make API requests. The API appid is not necessary private, but rather is used to track requests being submitted to the web service.
The MOStlyREST API also allows for the resetting of lost keys. The mod_rest module provides developers with a simple way to find the reset option, but should this not be published then this option can always be found at a URL like: