...
Excerpt | ||
---|---|---|
| ||
The Component API plugin grants API access to core and plugin components through the API. This can be used to, among other things, download PDF invoices via the API. |
Table of Contents | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Installing Component API
Unzip the following file in /plugins:
View file | ||||
---|---|---|---|---|
|
The Component API plugin can be installed under [Settings] > [Company] > [Plugins] > [Available].
...
Warning | ||
---|---|---|
| ||
Components are internal objects to Blesta and its respective plugins. Blesta makes no effort to ensure backwards compatibility for components, so the functionality (parameters and return results) of any and all methods executed through this plugin may change at any time. |
This plugin has a single model called ComponentApiCaller, which itself has a single callable method called call. Below are the parameters available to this method:
Parameter | Description |
---|---|
component | A string, the name of the component you wish to invoke (e.g. InvoiceDelivery) |
method | A string, the name of the method to invoke for the given component (e.g. DownloadInvoices) |
params | An array of parameters (each key is the name of the parameter) to pass to the component method |
construct_params | An array of parameters to pass to the constructor, numerically indexed in the order required by the component constructor. Only required if the component requires parameters to its constructor. |
Note | ||
---|---|---|
| ||
Note all components may be invoked via the API due to requirements for constructor and method parameters. Consult the documentation for the component you wish to invoke. |
...