Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Excerpt
hiddentrue

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
Table of Contents
maxLevel4
minLevel2
outlinetrue
classtoc

Installing Component API

Unzip the following file in /plugins:

View file
namecomponent_api.zip
height250

The Component API plugin can be installed under [Settings] > [Company] > [Plugins] > [Available].

...

Warning
titleCompatibility 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: 


ParameterDescription
componentA string, the name of the component you wish to invoke (e.g. InvoiceDelivery)
methodA string, the name of the method to invoke for the given component (e.g. DownloadInvoices)
paramsAn 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
titleNote

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.

...