Child pages
  • UAPI Functions - WordPressBackup::any_running
Skip to end of metadata
Go to start of metadata

Description

This function checks for any active WordPress® site backups on the cPanel account.

Note:

You must install the WordPress Manager cPanel plugin to access this API function.

Examples 


 cPanel or Webmail Session URL
https://hostname.example.com:2083/cpsess##########/execute/WordPressBackup/any_running


Note:

This example calls the UAPI function via a cPanel session. For more information, read our Guide to UAPI documentation. 

 LiveAPI PHP Class
$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
 
// Check for any active WordPress site backups on account.
 $instances = $cpanel->uapi(
    'WordPressBackup', 'any_running',
);


Note:

For more information, read our Guide to the LiveAPI System.

 LiveAPI Perl Module
my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
 
# Check for any active WordPress site backups on account.
my $instances = $cpliveapi->uapi(
    'WordPressBackup', 'any_running',
);


Note:

For more information, read our Guide to the LiveAPI System.

 cPanel Template Toolkit
<!-- Check for any active WordPress site backups on account. -->
[% data = execute( 'WordPressBackup', 'any_running' ); %]


Note:

For more information, read our Guide to Template Toolkit documentation. 

 Command Line
uapi --user=username WordPressBackup any_running


Notes:

  • You must URI-encode values.
  • username represents your account-level username.
  • For more information and additional output options, read our Guide to UAPI documentation or run the uapi --help command. 
  • If you run CloudLinux™, you must use the full path of the uapi command:

    /usr/local/cpanel/bin/uapi


 Output (JSON)
{
	"status": 1,
	"warnings": null,
	"errors": null,
	"metadata": {},
	"messages": null,
	"data": {
		"sites": [{
			"type": "backup",
			"id": null,
			"site": "example.com"
		}],
		"sse_url": "/sse/WordPressBackup",
		"any_running": 1
	}
}


Note:

Use cPanel's API Shell interface (cPanel >> Home >> Advanced >> API Shell) to directly test cPanel API calls.

Parameters

This function does not accept parameters.

Returns

ReturnTypeDescriptionPossible valuesExample
any_running BooleanWhether any backups are active.
  • 1 — Backups in progress.
  • 0 — No backups in progress.
0
sse_urlstringThe SSE URL that the system uses to monitor the backup progress.The path to the SSE service, without the protocol, hostname, or port./sse/WordPressBackup
sitesarray

An array that contains each site with an active backup in progress.

The function only populates this array if it is actively processing a backup.

This array contains the id, site, and type returns.

id

string

The WordPress site's unique ID.

This function returns this value in the sites array.

nullnull is the only possible value.

Note:

We have not implemented this return.

null

site

string

The WordPress site's URL.

This function returns this value in the sites array.

A URL without the protocol prefix.example.com

type

string

This active process type.

This function returns this value in the sites array.

backupbackup is the only possible value.backup