6.1.4
Custom Web Services
Although the events interface typically serves most cases, there are some instances where an event is not supported that is desired. This is especially true when an external resource is the source of the event. To address these issues, plugins can expose custom web services to external resources. These web services can be named freely and do anything they want within the plugin framework.
For example, suppose a resource needs to notify a plugin that provisioning of a virtual machine has been completed. Instead of having the plugin poll the resource to verify that the provisioning was finished, the plugin could expose a custom web service to handle notification from the resource itself.
Sample custom web service ------------------------------------ def vmProvisionFinished(Map params) { // Handle event return [messages:["Event successfully processed"]] }
Additionally, plugin types can define web services that are unsecured, meaning that a user or application account is not required to access it. A full explanation of the syntax and creation of custom secured and unsecured web services can be seen on 6.2.8 Exposing Web Services.
For information how resources can access plugin web services, see the section Accessing Plugin Web Services.
Related Topics