Flash API
This plugin serves as a faux web service that outputs data from the WP Database…
Plugin info
Maintenance & Compatibility
Maintenance score
Possibly abandoned • Last updated 5498 days ago
Is Flash API abandoned?
Possibly abandoned (last update 5498 days ago).
Compatibility
Similar & Alternatives
Explore plugins with similar tags, and compare key metrics like downloads, ratings, updates, support, and WP/PHP compatibility.
Description
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.
Installation
- Upload
flash_apidirectory to the/wp-content/plugins/directory - 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
/flash-api/includesdirectory - 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
/prefix - 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
Frequently Asked Questions
How do I create a function?
See Installation documentation
How do I use this with my app?
The example is for flash but the API can be used with just about anything from mobile apps to ajax/jquery javascripts
See the flash example: /wp-content/plugins/flash_api/flash_example/flash_api_example.fla
Can I set API keys for individual Users?
Yes!
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 domain parameter 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 $_REQUEST["apiKey"] value.
You can also set user permissions within your services via WordPress’s user levels manangement (see https://codex.wordpress.org/User_Levels).
Review feed
Changelog
2.0.2
- Fixed xml output formatting.
- Fixed settings update error.
- Cleaned up output formatting.
- Updated Flash Example
2.0.1
- Fixed issue where services weren’t showing up on some versions of wp
2.0.0
- 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 theoutputparameter tojsonorxml.
1.0.4
- Added functionality to restrict API usage to specific domains.
1.0.3
- Fixed User profile ability to change own API Key if non-admin. Only ‘add_user’ level users can edit individual API Keys.
1.0.2
- Fixed plugin directory error.


