Service: GetSources

The GetSources service allows you to retrieve a list of all sources for an account.

Service Details

SOAP Action: GetSources
SOAP Return Object: GetSourcesResp

Input

The following table describes the parameters used for calling the GetSources service.

Table: instance of GetSourcesReq

Parameter Mandatory Type Description
header Y APIRequestHeader Header for authentication

Output

The following table describes the parameters returned from the GetSources service.

Table: instance of GetSourcesResp

Parameter Mandatory Type Description
header / APIResponseHeader Header containing authentication information
errorCode / Integer Numerical value of the error
errorMessage / String Short literal description of the error
sources / Array of SourceType Sources

Table: response codes of GetSourcesResp.

0 No error
220 Authentication error, see header object for detailed information
500 Internal error

Example

Get a list of all sources in an account

<?php
$header->header->userId	= MY_USER_ID;
$header->header->userToken = MY_TOKEN;

$getSourcesReq->header = $header;
$getSourcesResp = $SoapClient->__soapCall("GetSources", array($getSourcesReq));

if ($getSourcesResp ->errorCode == 0) {
	foreach ($getSourcesResp->sources as $source) {
		echo $source->id . " - " . $source->name;
	}
} else {
	echo "GetResources failed: " . $getSourcesResp->errorMessage;
}
?>