Scroll

SOAP API: PHP Sample Code

The following examples demonstrate the capabilities of the Web Service Api using PHP.

It is important that the first call instantiate an Api object. After making all the desired changes the final call should be GetUrlParamString. Then redirect the user to Exago’ Url concatenated with  the string GetUrlParamString returns.

In all of the examples below the return value should be checked for validity.  The examples below have omitted these checks for clarity.

Create Api object and initialize

$client = new SoapClient('http://MyServer/ExagoApi/Api.asmx?wsdl');

 

$r = $client->InitializeApi();

$apiId = $r->InitializeApiResult;

 

Activate a role

$r = $client->Role_Activate(array('apiId' => $apiId, 'roleId'=>'Admin'));

$result = $r->Role_ActivateResult;

 

Activate a report

$r = $client->ReportObject_Activate(array('apiId' => $apiId, 'reportName'=>'Stew Meyers' Reports\\My Report'));

 

Get URL

$url = "http://MyServer/Exago/" . $client->GetUrlParamString(array('apiId' => $apiId);

Hidden Article Information

Article Author
Alex Agoado
created 2015-12-17 21:14:36 UTC
updated 2017-02-21 17:11:39 UTC

Labels
API, SOAP, Examples,
Have more questions? Submit a request