Web Services are declared through the
org.sonar.api.server.ws.WebService extension point. Contrary to the deprecated
org.sonar.api.web.Webservice extension point, implementation does not require any Ruby on Rails code and can rely upon dependency injection.
An implementation of
WebService must declare the path under which it will be published. This path must not start with a '
/' character. It is recommended to start with the '
api' string and to use lower case with underscores - e.g '
api/my_plugin_service'. It is also recommended to provide other metadata, which will be used to document the web service in the built-in Web service API page.
WebService can provide several actions, each associated to a
See the Javadoc of the cited classes for more information.
Plugins can provide static files like images, CSS or JS files. They have to be copied in
src/main/resources/static and then can by accessible from the public URL :
Note that the plugin key is logged during the maven build :
Static files are not deployed on the fly when the development mode is enabled. The plugin has to be built and re-installed after changes.
Web App Pages
See Creating a Page