Versions Compared

Key

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

...

The structure of an API request involves passing to specifying the API the model, method, and format to be requested, along with any additional parameters the method may require. For example:

No Format
https://yourdomain.com/installpath/index.php/api/users/get.xml?user_id=1

In the above example, yourdomain.com is your domain and installpath is the path to the Blesta installation. If you have enabled pretty URLs in Blesta the path may omit the index.php portion. users is the model to request, get is the method, and xml is the format.

Info
titleRequesting Models of Plugins

To request a specify model of a plugin format your request as /plugin.model/method.format.

 

Formats

The API supports XML, JSON, and PHP serialization formats. By default XML formatting is used. So if there is an error detecting the format of the request (due to a bad URL, for example) the error response will be returned in XML format.

...