Login/Register

Automation API: List of available HTTP interface methods

Input/output

All output will be JSON formatted.

If JSON input is preferred to URL key-value pairs, JSON can be sent in the raw HTTP POST data.

Table of contents

Back to top▴

List available applications and application information

HTTP GET or POST:

/url/to/installatron?api=json&cmd=browser
/url/to/installatron?api=json&cmd=browser&application=magento

NAMEVALUE
cmdbrowser
apijson
application
optional
The ID of the application to list available versions of. This can be a single application or an array of multiple applications. By default the latest version of each application is listed. Listed versions are ordered correctly.
version
optional
If application is set to one application, set this to only list the specific version.
from-version
optional
If application is set to one application, set this to list all versions from specified version to the latest version. Each listed version includes a "upgrade_from" member which reveals whether an install at the specified version can upgraded to the listed version (values of "none" or "manual" mean it cannot). Listed versions are ordered correctly.
versions-available-from
optional
If application is set to one application, instead of the usual output this will return two lists, "versions-available" and "versions-available-minor", each listing the versions upgradable to from the specified value.
language
optional
The language application information should be returned in. For example, "en" for English or "zh_tw" for Chinese Traditional. If omitted, the defined website's default language or English is assumed. See: Available Installatron Translations.

Return values:

NAMEVALUE
resulttrue on success, or false on failure.
messageSuccess or failure message.
dataTable of application information.

Back to top▴

Install an application

Note: When the install is complete, the new install owner will be emailed install login information.

HTTP GET or POST:

/url/to/installatron?api=json&cmd=install

NAMEVALUE
cmdinstall
apijson
application
required
The ID of the application to be installed. For example, "wordpress" or "magento". Use the browser API to get a list of available applications.
version
optional, default is the latest compatible version
The version of the application to be installed.
autoup
optional
Change automatic update configuration. Values: 0 = Off (default); 1 = Update to minor versions only; 2 = Update to any version.
autoup_backup
optional
Automatically create a backup and automatically restore the backup if the update fails. Values: 0 = Off; 1 = On (default).
url
required
The URL to where the application should be installed.
url_ip
optional, default is the IP address resolved via DNS
If the DNS will not resolve the provided url to the correct IP, use this argument to provide the correct IP.
db_host
optional, if omitted a new database is automatically created
The database server.
db_name
optional, if omitted a new database is automatically created
The pre-created database.
db_user
optional, if omitted a new database is automatically created
The pre-created database username.
db_pass
optional, if omitted a new database is automatically created
The pre-created database password.
db_prefix
optional, defaults to the prefix behavior configured at Installatron Admin > Features
The prefix applied to database tables.
db_host_ip
optional, typically omitted
If a different MySQL host value must be temporarily used to connect to the database, use this argument to provide the temporary address. Installed application files will be written with the "db_host" value, but Installatron will use "db_host_ip" while installing.
notification
optional
List of email notifications to send for the installed application (each separated with a comma). Omit this argument entirely to send all notifications, or define an empty string to send no notifications.

Available notifications:
  • install
  • install_error
  • clone
  • clone_error
  • backup
  • backup_error
  • restore
  • restore_error
  • update_available
  • update
  • update_error
  • plugin_update_available
  • plugin_update
  • plugin_update_error

A sample value could look like "update_available,update,update_error"
background
optional
When defined, the request will exit immediately and the task will be transferred to a background process after preliminary error checking. Use the tasks API to query the status of the background task.

Optional automatic backup arguments:

NAMEVALUE
autobk
optional
Change automatic backup configuration. Values: custom = A custom schedule; (id) = The schedule identified by (id).
autobk_daily
optional
The number of daily backups (for the "custom" option)
autobk_weekly
optional
The number of weekly backups (for the "custom" option)
autobk_monthly
optional
The number of monthly backups (for the "custom" option)

Optional remote backup arguments:

NAMEVALUE
bkloc
optional
Set this to the URI to a backup location (which will be associated with the defined "user" for the session).

Supported filesystem protocols:
  • FTP
  • FTPS
  • SFTP
  • SSH
  • WebDAV (HTTP)
  • WebDAVS (HTTPS)

Examples:
  • ftp://user:pass@server
  • sftp://user:pass@server/backups
  • ftp://user:pass@server/backups
  • webdav://user:pass@server/backups

Further optional arguments that depend on the application (get a full list of fields available for a specific application/version using the browser API):

NAMEVALUE
language
optional, default is the website's default language or English
The language of the application to be installed. For example, "en" for English or "zh_tw" for Chinese Traditional. Use the browser API to get a list of available languages for the installed application.
login
optional, default is randomly generated value
The username for the installed application's administrative account.
passwd
optional, default is randomly generated value
The password for the installed application's administrative account. If omitted, a randomized password is assumed.
sitetitle
optional, default is "My blog" or similar
The site title value for the installed application.
content
optional, default is "yes"
Set to "yes" for the sample/demo template.
Set to "no" for the blank install template.
Set to the ID of the template for a different template.

Return values:

NAMEVALUE
resulttrue on success, or false on failure.
messageSuccess or failure message.
dataTable of installed application information.
taskTable of task information if executed as a background process.

Back to top▴

Import an existing application (from the local server or a different server)

HTTP GET or POST:

/url/to/installatron?api=json&cmd=import

NAMEVALUE
cmdimport
apijson
application
required
The ID of the application to be imported or migrated. For example, "wordpress" or "magento". See: List of applications.
version
optional, defaults to the automatically-detected version
The version of the application to be imported. If omitted, the version is automatically detected.
url
required
The URL to where the application is installed.
url_ip
optional, default is the IP address resolved via DNS
If the DNS will not resolve the provided url to the correct IP, use this argument to provide the correct IP.
source_url
required if migrating an installed application from a remote server
If migrating an installed application from a remote server, include this argument to provide the source installed application URL.

For example, "http://website.com/wordpress".
source_ftu
required if migrating an installed application from a remote server
If migrating an installed application from a remote server, include this argument to provide the source installed application account information.

Supported filesystem protocols:
  • FTP
  • FTPS
  • SFTP
  • SSH

Examples:
  • ftp://user:pass@website.com
  • sftp://user:pass@website.com/public_html
  • ftp://user:pass@website.com/public_html/wordpress

Return value:

NAMEVALUE
resulttrue on success, or false on failure.
messageSuccess or failure message.
dataTable of installed application information.

Back to top▴

List installed applications

HTTP GET or POST:

/url/to/installatron?api=json&cmd=installs

NAMEVALUE
cmdinstalls
apijson
q
optional
Search installed application with a query. This searches the title, url, id, installer, and owner fields.
id
optional
Display a specific installed application by ID.
filter-version-available
optional
When set equal to "yes", only installed applications that have any new version upgrades available will be listed.
filter-version-available-minor
optional
When set equal to "yes", only installed applications that have new minor version upgrades available will be listed.

Return value:

NAMEVALUE
resulttrue on success, or false on failure.
messageSuccess or failure message.
dataDetailed list of matched installed applications.

Back to top▴

List installed application backups

HTTP GET or POST:

/url/to/installatron?api=json&cmd=backups

NAMEVALUE
cmdbackups
apijson
q
optional
Search installed application backups with a query. This searches the title, url, id, installer, and owner fields.
pid
optional
Display only installed application backups that belong to this installed application ID. This can be used in conjunction with the "q" argument. (added with version 4.1.5)
id
optional
Display a specific installed application backup by ID.

Return value:

NAMEVALUE
resulttrue on success, or false on failure.
messageSuccess or failure message.
dataDetailed list of matched installed application backups.

Back to top▴

View/sync an installed application

HTTP GET or POST:

/url/to/installatron?api=json&cmd=view

NAMEVALUE
cmdview
apijson
id
required
The ID of the installed application to be synced and displayed.
addons
optional
Set to a value of 1 to include a list of installed plugins and themes in the result. (WordPress only)

Return value:

NAMEVALUE
resulttrue on success, or false on failure.
messageSuccess or failure message.
dataApplication details, similar to the "installs" API return value.

Edit an installed application

Note: Optional arguments can be omitted if they should remain unchanged.

HTTP GET or POST:

/url/to/installatron?api=json&cmd=edit

NAMEVALUE
cmdedit
apijson
id
required
The ID of the installed application to be edited.
url
optional, defaults to the existing value
The URL to the installed application.
autoup
optional, defaults to the existing value
Change automatic update configuration. Values: 0 = Off; 1 = Update to minor versions only; 2 = Update to any version.
autoup_backup
optional, defaults to the existing value
Automatically create a backup and automatically restore the backup if the update fails. Values: 0 = Off; 1 = On (default).
notification
optional, defaults to the existing value
List of email notifications to send for the installed application (each separated with a comma). Omit this argument entirely to send all notifications, or define an empty string to send no notifications.

Available notifications:
  • install
  • install_error
  • clone
  • clone_error
  • backup
  • backup_error
  • restore
  • restore_error
  • update_available
  • update
  • update_error
  • plugin_update_available
  • plugin_update
  • plugin_update_error

A sample value could look like "update_available,update,update_error"
db_host
optional, defaults to the existing value
The server that hosts the installed application's database.
db_name
optional, defaults to the existing value
The name of the installed application's database.
db_user
optional, defaults to the existing value
The database username used to connect to the installed application's database.
db_pass
optional, defaults to the existing value
The database username password.
db_prefix
optional, defaults to the existing value
The prefix each database table begins with, including trailing underscore (if any).

Automatic backup arguments:

NAMEVALUE
autobk
optional, defaults to the existing value
Change automatic backup configuration. Values: custom = A custom schedule; (id) = The schedule identified by (id).
autobk_daily
optional, defaults to the existing value
The number of daily backups (for the "custom" option)
autobk_weekly
optional, defaults to the existing value
The number of weekly backups (for the "custom" option)
autobk_monthly
optional, defaults to the existing value
The number of monthly backups (for the "custom" option)

Remote backup arguments:

NAMEVALUE
bkloc
optional, defaults to the existing value
Set this to the URI to a backup location (which will be associated with the defined "user" for the session).

Supported filesystem protocols:
  • FTP
  • FTPS
  • SFTP
  • SSH
  • WebDAV (HTTP)
  • WebDAVS (HTTPS)

Examples:
  • ftp://user:pass@server
  • sftp://user:pass@server/backups
  • ftp://user:pass@server/backups
  • webdav://user:pass@server/backups

Further arguments that depend on the application (get a full list of fields available for a specific application/version using the browser API):

NAMEVALUE
language
optional, defaults to the existing value
The language of the installed application. Use the browser API to get a list of available languages for the installed application.
login
optional, defaults to the existing value
The username of the installed application's administrative account.
passwd
optional, defaults to the existing value
The password of the installed application's administrative account.
email
optional, defaults to the existing value
The email of the installed application's administrative account.
sitetitle
optional, defaults to the existing value
The site title value of the installed application.

Remove any backups connected to this installed application from the database:

NAMEVALUE
delete-backups
optional, defaults to null
Set to 'true' to delete any backups connected to the installed application from the Installatron database. The backup archives will be unaffected.

Remove the installed application from the database:

NAMEVALUE
delete
optional, defaults to null
Set to 'true' to delete the installed application from the Installatron database only. The installed application files and tables will be unaffected.

Return value:

NAMEVALUE
resulttrue on success, or false on failure.
messageSuccess or failure message.
dataFurther details regarding the success or failure.

Backup an installed application

HTTP GET or POST:

/url/to/installatron?api=json&cmd=backup

NAMEVALUE
cmdbackup
apijson
id
required
The ID of the installed application to be backed up.
background
optional
When defined, the request will exit and the task will be transferred to a background process. Use the tasks API to query the status of the background task.

Possible values include:
  • Any value other than "quick": The task will exit after preliminary error checking is completed to ensure there's enough disk space, etc..
  • A value of "quick": The task will exit immediately, withholding preliminary error checking until the process is executing in the background.
expiry
optional, defaults to never
Possible values include:
  • "never": The created backup will never expire. This is the default value.
  • "auto": Automatically expire the backup based on the configured backup expiration rules (the default is 14 days)
  • Any number: The created backup will expire after the number of days identified by the provided number.

Return value:

NAMEVALUE
resulttrue on success, or false on failure.
messageSuccess or failure message.
dataFurther details regarding the success or failure.
taskTable of task information if executed as a background process.

Clone an installed application

HTTP GET or POST:

/url/to/installatron?api=json&cmd=clone

Required arguments:

Optional arguments:

Optional database arguments:

Return value:

Update an installed application

Note: It's always recommended to create a backup prior to updating any installed application.

HTTP GET or POST:

/url/to/installatron?api=json&cmd=upgrade

Required arguments:

Optional arguments:

Return value:

Restore an installed application backup

HTTP GET or POST:

/url/to/installatron?api=json&cmd=restore

Required arguments:

Optional arguments:

Return value:

Uninstall an installed application

HTTP GET or POST:

/url/to/installatron?api=json&cmd=uninstall

Required arguments:

Optional arguments:

Return value:

Delete an installed application backup

HTTP GET or POST:

/url/to/installatron?api=json&cmd=delete

Required arguments:

Optional arguments:

Return value:

Import a backup

HTTP GET or POST:

/url/to/installatron?api=json&cmd=importbackup

NAMEVALUE
cmdimportbackup
apijson
user
required
The user to import the backup for.
path
required
The path to the installed application backup archive to be imported, relative to the path defined for the user specified.

Return value:

NAMEVALUE
resulttrue on success, or false on failure.
messageSuccess or failure message.
dataFurther details regarding the success or failure.

List currently executing and recently completed tasks

HTTP GET or POST:

/url/to/installatron?api=json&cmd=tasks

Optional arguments:

Return value:

© 2004 - 2016 Installatron LLC. All rights reserved.