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 (SOAP) v1

getData (SOAP) v1

Method: getData

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

  • vistor
  • transaction
  • total

SOAP Request

 

    <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:v1="https://urchin.com/api/urchin/v1/">
       <soap:Header/>
       <soap:Body>
          <v1:getData>
             <!--You may enter the following 12 items in any order-->
             <login>LOGIN</login>
             <password>PASSWORD</password>
             <ids>PROFILE_ID</ids>
             <!--Optional:-->
             <start-index>INDEX</start-index>
             <!--Optional:-->
             <max-results>MAX_RESULTS</max-results>
             <start-date>START_DATE</start-date>
             <end-date>END_DATE</end-date>
             <dimensions>DIMENSIONS</dimensions>
             <!--Optional:-->
             <metrics>METRICS</metrics>
             <!--Optional:-->
             <sort>SORT</sort>
             <!--Optional:-->
             <filters>FILTER</filters>
             <!--Optional:-->
             <table>TABLE_ID</table>
          </v1:getData>
       </soap:Body>
    </soap:Envelope>

Request arguments:

  • login - User name login

  • password - User password

  • ids - Comma-separated list of data source profile IDs. Currently only one ID is supported. If several IDs are specified, the first ID is used.

  • 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 a list of dimensions, see Dimensions v1.

  • metrics - A commas 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 user specifies same metric twice, only first one is returned (limitation of WSDL schema). 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 sort in descending order, the sort field must include the "-" sign, e.g. sort="-u:browser".

  • filters (not included in Beta) (optional field) - An optional parameter specifying to filter response data according to expression. Filter can only be applied to field, which is present in request query. See Filters (SOAP) v1.

  • table (optional field) - ID of table from which to extract data. This parameter is optional. For a list of tables, see Tables v1.

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 direct name binding. Instead they are returned as unbounded array of dimensions with names in attribute (see WSDL and example).

Response WSDL

 

    <xsd:complexType name="DataDimension">
        <xsd:simpleContent>
            <xsd:extension base="xsd:string">
                <xsd:attribute name="name" type="xsd:string"/>
            </xsd:extension>
        </xsd:simpleContent>
    </xsd:complexType>
    <xsd:complexType name="DataDimensions">
        <xsd:sequence>
            <xsd:element name="dimension" type="tns:DataDimension" maxOccurs="unbounded" minOccurs="1"/>
        </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="DataMetrics">
        <xsd:all>
            <xsd:element name="hits" form="qualified" minOccurs="0" maxOccurs="1" type="xsd:long"/>
            <xsd:element name="validhits" form="qualified" minOccurs="0" maxOccurs="1" type="xsd:long"/>
            <xsd:element name="errorhits" form="qualified" minOccurs="0" maxOccurs="1" type="xsd:long"/>
            <xsd:element name="bytes" form="qualified" minOccurs="0" maxOccurs="1" type="xsd:long"/>
            <xsd:element name="pages" form="qualified" minOccurs="0" maxOccurs="1" type="xsd:long"/>
            <xsd:element name="nonpages" form="qualified" minOccurs="0" maxOccurs="1" type="xsd:long"/>
            <xsd:element name="entrancepages" form="qualified" minOccurs="0" maxOccurs="1" type="xsd:long"/>
            <xsd:element name="exitpages" form="qualified" minOccurs="0" maxOccurs="1" type="xsd:long"/>
            <xsd:element name="bouncepages" form="qualified" minOccurs="0" maxOccurs="1" type="xsd:long"/>
            <xsd:element name="pagetime" form="qualified" minOccurs="0" maxOccurs="1" type="xsd:long"/>
            <xsd:element name="visits" form="qualified" minOccurs="0" maxOccurs="1" type="xsd:long"/>
            <xsd:element name="visitors" form="qualified" minOccurs="0" maxOccurs="1" type="xsd:long"/>
            <xsd:element name="newvisitors" form="qualified" minOccurs="0" maxOccurs="1" type="xsd:long"/>
            <xsd:element name="priorvisitors" form="qualified" minOccurs="0" maxOccurs="1" type="xsd:long"/>
            <xsd:element name="transactions" form="qualified" minOccurs="0" maxOccurs="1" type="xsd:long"/>
            <xsd:element name="customers" form="qualified" minOccurs="0" maxOccurs="1" type="xsd:long"/>
            <xsd:element name="newcustomers" form="qualified" minOccurs="0" maxOccurs="1" type="xsd:long"/>
            <xsd:element name="priorcustomers" form="qualified" minOccurs="0" maxOccurs="1" type="xsd:long"/>
            <xsd:element name="revenue" form="qualified" minOccurs="0" maxOccurs="1" type="xsd:decimal"/>
            <xsd:element name="tax" form="qualified" minOccurs="0" maxOccurs="1" type="xsd:decimal"/>
            <xsd:element name="shipping" form="qualified" minOccurs="0" maxOccurs="1" type="xsd:decimal"/>
            <xsd:element name="items" form="qualified" minOccurs="0" maxOccurs="1" type="xsd:long"/>
            <xsd:element name="itemrevenue" form="qualified" minOccurs="0" maxOccurs="1" type="xsd:long"/>
            <xsd:element name="responses" form="qualified" minOccurs="0" maxOccurs="1" type="xsd:long"/>
            <xsd:element name="impressions" form="qualified" minOccurs="0" maxOccurs="1" type="xsd:long"/>
            <xsd:element name="clicks" form="qualified" minOccurs="0" maxOccurs="1" type="xsd:long"/>
            <xsd:element name="cost" form="qualified" minOccurs="0" maxOccurs="1" type="xsd:decimal"/>
            <xsd:element name="goals1" form="qualified" minOccurs="0" maxOccurs="1" type="xsd:long"/>
            <xsd:element name="goals2" form="qualified" minOccurs="0" maxOccurs="1" type="xsd:long"/>
            <xsd:element name="goals3" form="qualified" minOccurs="0" maxOccurs="1" type="xsd:long"/>
            <xsd:element name="goals4" form="qualified" minOccurs="0" maxOccurs="1" type="xsd:long"/>
            <xsd:element name="goalstarts1" form="qualified" minOccurs="0" maxOccurs="1" type="xsd:long"/>
            <xsd:element name="goalstarts2" form="qualified" minOccurs="0" maxOccurs="1" type="xsd:long"/>
            <xsd:element name="goalstarts3" form="qualified" minOccurs="0" maxOccurs="1" type="xsd:long"/>
            <xsd:element name="goalstarts4" form="qualified" minOccurs="0" maxOccurs="1" type="xsd:long"/>
            <xsd:element name="score" form="qualified" minOccurs="0" maxOccurs="1" type="xsd:decimal"/>
        </xsd:all>
    </xsd:complexType>
    <xsd:complexType name="Data">
        <xsd:sequence>
            <xsd:element name="recordId" type="xsd:long" minOccurs="1" maxOccurs="1" />
            <xsd:element name="dimensions" type="tns:DataDimensions" minOccurs="1" maxOccurs="1" />
            <xsd:element name="metrics" type="tns:DataMetrics" minOccurs="1" maxOccurs="1" />
        </xsd:sequence>
    </xsd:complexType>

E.g.: If the SOAP request contains the following parameters:

 

    <dimensions>u:browser_base,u:browser_version</dimensions>
    <metrics>u:hits,u:bytes</metrics>

the following response will be produced:

 

    <record>
     <recordid>1</recordid>
     <dimensions>
      <dimension name="u:browser_base">firefox</dimension>
      <dimension name="u:browser_version">3.0</dimension>
     </dimensions>
     <metrics>
      <u:hits xmlns:u="https://urchin.com/api/urchin/v1/">20</u:hits>
       <u:bytes xmlns:u="https://urchin.com/api/urchin/v1/">300</u:bytes>
     </metrics>
    </record>
    <record>
     <recordid>2</recordid>
     <dimensions>
      <dimension name="u:browser_base">chrome</u:dimension>
      <dimension name="u:browser_version">1.0</u:dimension>
     </dimensions>
     <metrics>
      <u:hits xmlns:u="https://urchin.com/api/urchin/v1/">10</u:hits>
      <u:bytes xmlns:u="https://urchin.com/api/urchin/v1/">200</u:bytes>
     </metrics>
    </record>

Java and .NET C# Samples

The following samples are available for this method:

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