Child pages
  • UAPI Functions - WordPressInstanceManager::cleanup_scan
Skip to end of metadata
Go to start of metadata

Description

This function cleans up the scan log file after you complete a scan with the WordPressInstanceManager::start_scan function. To read more information about the complete scan process, read our UAPI Functions - WordPressInstanceManager::start_scan documentation.

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/WordPressInstanceManager/cleanup_scan?guid=B3A27B96-51F7-11E8-92E3-CC90C4F823F0


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.
 
// Clean up WordPress scan log file.
 $instances = $cpanel->uapi(
    'WordPressInstanceManager', 'cleanup_scan',
	array(	
		'guid' => 'B3A27B96-51F7-11E8-92E3-CC90C4F823F0'
	)
);


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.
 
# Clean up WordPress scan log file.
my $instances = $cpliveapi->uapi(
    'WordPressInstanceManager', 'cleanup_scan',
	{
		'guid' => 'B3A27B96-51F7-11E8-92E3-CC90C4F823F0'
	}
);


Note:

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

 cPanel Template Toolkit
<!-- Clean up WordPress scan log file. -->
[% data = execute( 'WordPressInstanceManager', 'cleanup_scan' , { 'guid' => 'B3A27B96-51F7-11E8-92E3-CC90C4F823F0' } ); %]


Note:

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

 Command Line
uapi --user=username WordPressInstanceManager cleanup_scan guid=B3A27B96-51F7-11E8-92E3-CC90C4F823F0


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/api/uapi


 Output (JSON)
{
	"data": null,
	"status": 1,
	"metadata": {},
	"messages": null,
	"errors": null,
	"warnings": null
}


Note:

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

Parameters

ParameterTypeDescriptionPossible vaulesExample
guidstring

Required

A scan's unique ID.

A valid string.

Note:

The system provides this parameter's value in the guid return with the WordPressInstanceManager::start_scan function.

B3A27B96-51F7-11E8-92E3-CC90C4F823F0

Returns

This function only returns metadata.