Notification

Urchin WebAnalytics Software is discontinued and is no longer supported. All Urchin documentation applies only to the Urchin product as it was at the time of discontinuation, and does not apply to any Google Analytics products or services.

getData (REST) v1

getData (REST) v1

Method: getData

This method retrieves data for the specified dimensions/metrics from the following static tables:

  • vistor
  • transaction
  • total

REST URL:

 

http://server.com/api/urchin/v1/ReportService/data?login=$login&password=$password&ids=$PROFILE_ID&start-index=$start-index&max-results=$max-results&start-date=$start-date&end-date=$end-date&dimensions=$dimensions&metrics=$metrics&sort=$sort&table=$table&filters=$filters

Request arguments:

  • login - User name login

  • password - User password

  • ids - Comma-separated list of data source profile IDs. Currently only one ID is supported. In case of several IDs are specified than only first one is taken into account.

  • start-index (optional field) - 1-based starting index. Default value is 1. (The 1-based index is external for compatibility with Google Analytics. Internally it is 0-based).

  • max-results - Maximum number of results to return. This parameter is optional. The default value is 500.

  • start-date - First date from which to collect data in the form YYYY-MM-DD. This parameter is required.

  • end-date - Last date from which to collect data in the form YYYY-MM-DD. This parameter is required.

  • dimensions - A comma separated list of dimensions to organize the data by. This parameter is required. For additional information, see Dimensions v1.

  • metrics - A comma separated list of metrics to aggregate and include in the report. This parameter is optional and may also be set to an empty string (e.g., "metrics=&start-date..."). If absent or blank, the server does not return any metrics. If the user specifies same metric twice, only the first one is returned (WSDL schema limitation). For additional information, see Metrics and Units v1.

  • sort (optional field) - An optional parameter specifying which dimensions and metrics to sort by, in which directions and in which order. This parameter is optional, and may also be set to an empty string (e.g., sort=&start-date="2008-10-10"). If absent or blank, the server sorts by first listed dimension in ascending order. In v1.0 sort supports only one column. To specify descending order, the sort field must include the "-" sign, e.g. sort="-u:browser".

  • filters (no included in Beta) (optional field) - An optional parameter specifying to filter response data according to expression. A filter can only be applied to a field that is present in the request query. See Filters (REST) v1.

  • table (optional field) - ID of data storage to extract data from. This parameter is optional. A list of all available tables can be found in Tables v1.

REST Response:

  • Record[] - Response is 2-dimensional array of data, each column corresponds to dimension or metric values. Since dimensions are extensible, they can't have a direct name binding. Instead they are returned as an unbounded array of dimensions with names in attribute.

Java and .Net C# samples

The following samples are available for this method:

 
true
Search
Clear search
Close search
Main menu
1549294853321044380
true
Search Help Center
true
true
true
false
false