Use the {{getAgents}} API to retrieve a list of Backup Agents.
{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====########
#$AGENTID = "54689b68-8caa-4774-8873-2c3b63ec6dab";
#Retrieve a list of Backup Agents.
try{
$client = new soapclient("https://$HOST:$PORT/Agent?wsdl",
array('login'=>"$USER",
'password'=>"$PASS",
'cache_wsdl' => WSDL_CACHE_NONE,
'features' => SOAP_SINGLE_ELEMENT_ARRAYS,
'trace'=>1
)
);
$response=$client->getAgents();
var_dump($response);
echo "Successfully executed getAgents\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====########
#$AGENTID = "54689b68-8caa-4774-8873-2c3b63ec6dab";
#Retrieve a list of Backup Agents.
try{
$client = new soapclient("https://$HOST:$PORT/Agent?wsdl",
array('login'=>"$USER",
'password'=>"$PASS",
'cache_wsdl' => WSDL_CACHE_NONE,
'features' => SOAP_SINGLE_ELEMENT_ARRAYS,
'trace'=>1
)
);
$response=$client->getAgents();
var_dump($response);
echo "Successfully executed getAgents\n";
exit(0);
}
catch (SoapFault $exception)
{
echo $exception;
exit(1);
}
{code}