This plugin serves as a faux web service that outputs data from the WP Database to an application in the format of XML or JSON. It is intended to make managing data for applications easier by leveraging WordPress’ awesome admin and data management.
This plugin insures that the requesting party is a valid user of the API before outputing any data or executing a function.
* PHP and WordPress knowledge is required to create your own functions and data outputs.
** Be sure to backup your services.php file when updating to newer versions of the plugin.
flash_apidirectory to the
- Activate the plugin through the ‘Plugins’ menu in WordPress
- Click Flash API from the
Admin -> SettingsMenu
- Set the Application key (this is generated by default but it is wise to change this)
- See the
wp-content/plugins/flash-api/includes/test.phpfile as an example on how to create a function
- Upload your new function file to the
- Create a new API Function post (Note: This is how the API recognizes your function and includes it). Be sure to title your post the same as the function you created
- Set the Includes Path in the Flash API Options box like so: includes/yourfunction.php (note there is no
- Publish your function
- Test your function by navigating to the service like so… http://yourwebsite.com/wp-content/plugins/flash-api/wsrv.php?apiKey=YOURKEY&service=YOURFUNCTIONNAME=&yourparam=YOURPARAMVALUE
- How do I create a function?
- How do I use this with my app?
See the flash example:
- Can I set API keys for individual Users?
1. Edit the user’s
profile -> Flash API -> API Domain value.
2. Edit the user’s
profile -> Flash API -> API API Key value.
2. Give that apiKey to the user to use for their flash apps.
3. The user must specify the
domainparameter when calling functions from mobile apps or other domains. By default, the plugin will check the
$_SERVER["HTTP_HOST"]value for the correct domain.
You can then alter your services to work only for specific API keys by checking the
You can also set user permissions within your services via WordPress’s user levels manangement (see https://codex.wordpress.org/User_Levels).
There are no reviews for this plugin.
Contributors & Developers
“Flash API” is open source software. The following people have contributed to this plugin.Contributors
- Fixed xml output formatting.
- Fixed settings update error.
- Cleaned up output formatting.
- Updated Flash Example
- Fixed issue where services weren’t showing up on some versions of wp
- Complete overhaul or function referencing and management
- New and improved method for adding new services
- Improved per user api key security
- Custom post types for documentation. Giving you the ability to list your documentation by querying the ‘fapi’ post type.
- Added a standardized
output()function that will parse an Associative Array into JSON (default) or XML. You can specify which during your api call by setting the
- Added functionality to restrict API usage to specific domains.
- Fixed User profile ability to change own API Key if non-admin. Only ‘add_user’ level users can edit individual API Keys.
- Fixed plugin directory error.