Description
This function kills FTP sessions.
Examples
cPanel or Webmail Session URL
https://hostname.example.com:2083/cpsess##########/execute/Ftp/kill_session?login=weeones
LiveAPI PHP Class
$cpanel
=
new
CPANEL();
$kill_ftp
=
$cpanel
->uapi(
'Ftp'
,
'kill_session'
,
array
(
'login'
=>
'weeones'
,
)
);
$kill_ftp
=
$cpanel
->uapi(
'Ftp'
,
'kill_session'
,
array
(
'login'
=>
'all'
,
)
);
LiveAPI Perl Module
my
$cpliveapi
= Cpanel::LiveAPI->new();
my
$kill_ftp
=
$cpliveapi
->uapi(
'Ftp'
,
'kill_session'
,
{
'login'
=>
'weeones'
,
}
);
my
$kill_ftp
=
$cpliveapi
->uapi(
'Ftp'
,
'kill_session'
,
{
'login'
=>
'all'
,
}
);
cPanel Template Toolkit
[% execute( 'Ftp', 'kill_session', { 'login' => 'weeones' } ); %]
[% execute( 'Ftp', 'kill_session', { 'login' => 'all' } ); %]
Command Line
uapi --user=username Ftp kill_session login=weeones
|
Output (JSON)
{
"messages":null,
"errors":null,
"status":1,
"metadata":{
},
"data":null
}
Parameters
Parameter
|
Type
|
Description
|
Possible values
|
Example
|
login
|
string
|
The username for the session's FTP account.
This parameter defaults to all.
|
- all — Stops all FTP sessions for the cPanel account.
- An FTP account username, to stop only that user's session.
|
weeones
|
Returns
This function only returns metadata.