Use the {{setTaskHistoryLimit}} API to set the limit for retaining your task history.
{code}
########====CDP Server Configuration Start====########
#set CDP server host name
$HOST="10.230.131.25";
#set CDP server to access API
$PORT="9443";
#set CDP user
$USER="admin";
#set CDP user password
$PASS="admin";
########====CDP Server Configuration End====########
# arguments
$LIMIT="20";
if (strlen($LIMIT) < 1) {
echo "ERROR: --limit=<limit> must be defined\n";
exit(1);
}
#Set the limit for retaining your task history.
try{
$client = new soapclient("https://$HOST:$PORT/Configuration?wsdl",
array('login'=>"$USER",
'password'=>"$PASS",
'trace'=>1
)
);
$client->setTaskHistoryLimit(array('days'=>"$LIMIT")) ;
echo "Successfully executed setTaskHistoryLimit\n";
exit(0);
}
catch (SoapFault $exception)
{
echo $exception;
exit(1);
}
{code}
{code}
########====CDP Server Configuration Start====########
#set CDP server host name
$HOST="10.230.131.25";
#set CDP server to access API
$PORT="9443";
#set CDP user
$USER="admin";
#set CDP user password
$PASS="admin";
########====CDP Server Configuration End====########
# arguments
$LIMIT="20";
if (strlen($LIMIT) < 1) {
echo "ERROR: --limit=<limit> must be defined\n";
exit(1);
}
#Set the limit for retaining your task history.
try{
$client = new soapclient("https://$HOST:$PORT/Configuration?wsdl",
array('login'=>"$USER",
'password'=>"$PASS",
'trace'=>1
)
);
$client->setTaskHistoryLimit(array('days'=>"$LIMIT")) ;
echo "Successfully executed setTaskHistoryLimit\n";
exit(0);
}
catch (SoapFault $exception)
{
echo $exception;
exit(1);
}
{code}