Added JSON API to plugins.