PHP code example of dprmc / clear-structure-sentry-web-services
1. Go to this page and download the library: Download dprmc/clear-structure-sentry-web-services library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
dprmc / clear-structure-sentry-web-services example snippets
$location = 'https://sentry1234.clearstructure.com/WebServices/DataReporterService.asmx';
$user = 'jdoe';
$pass = '12345';
$debug = true;
$dataCubeName = 'my_portfolios_data_cube';
$cultureString = 'en-US';
$params = [];
$params[] = RetrieveDataCubeOutputAsDataSet::getDataCubeXmlParameter('start_date','1/1/2017','datetime');
$params[] = RetrieveDataCubeOutputAsDataSet::getDataCubeXmlParameter('as_of_date','1/31/2017','datetime');
try{
$service = new RetrieveDataCubeOutputAsDataSet(
$location,
$user,
$pass,
$dataCubeName,
$cultureString,
$params,
$debug);
$result = $service->run();
$schema = $result['schema'];
$rows = $result['rows'];
foreach($rows as $row){
echo("\n" . $row->account_number);
}
} catch(Exception $e) {
$this->error($e->getMessage() . " " . $e->getFile() . ':' . $e->getLine());
}
$location = 'https://sentry1234.clearstructure.com/WebServices/DataReporterService.asmx';
$user = 'jdoe';
$pass = '12345';
$debug = true;
$dataCubeName = 'my_portfolios_data_cube';
$cultureString = 'en-US';
try{
$service = new RetrieveDataCubeOutputWithDefaultsAsDataSet(
$location,
$user,
$pass,
$dataCubeName,
$cultureString,
$debug);
$result = $service->run();
$schema = $result['schema'];
$rows = $result['rows'];
foreach($rows as $row){
echo("\n" . $row->account_number);
}
} catch(Exception $e) {
$this->error($e->getMessage() . " " . $e->getFile() . ':' . $e->getLine());
}