All docs This doc
Skip to end of metadata
Go to start of metadata


Overview

The following operations allow you to work with stats. Click an operation name to see details on how to use it.

For a sample proxy service that illustrates how to work with stats, see Sample configuration.

OperationDescription
getDailyUsageRetrieves total and user-level usage count for the day.
getLast7DaysUsageRetrieves total and user-level usage count for the last 7 days.
getDailyErrorsRetrieves error codes and their count for the day.
getLast7DaysErrorsRetrieves error codes and their count for the last 7 days.

Operation Details

This section provides further details on the operations related to stats.

Get Daily Usage

The getDailyUsage operation retrieves total and user-level usage count for the day.

getDailyUsage
<marketo.getDailyUsage/>
Sample request

Following is a sample REST/JSON request that can be handled by the getDailyUsage operation.

Sample request for getDailyUsage
{
    "marketoInstanceURL":"https://Abc-def-029.mktorest.com",
    "clientSecret":"Vgo6rzIiJyXXXXXXXP3Zr56tK2hv8fJd",
    "clientId":"01f22a42-0f05-4e7f-b675-550b6XXXXXXX1",
}
Related Marketo documentation

http://developers.marketo.com/documentation/rest/get-daily-usage/

Get  Last 7 Days Usage

The getLast7DaysUsage operation retrieves total and user-level usage count for the last 7 days.

getLast7DaysUsage
<marketo.getLast7DaysUsage/>
Sample Request

Following is a sample REST/JSON request that can be handled by the getLast7DaysUsage operation.

Sample request for getLast7DaysUsage
{
    "marketoInstanceURL":"https://Abc-def-029.mktorest.com",
    "clientSecret":"Vgo6rzIiJyXXXXXXXP3Zr56tK2hv8fJd",
    "clientId":"01f22a42-0f05-4e7f-b675-550b6XXXXXXX1"
}
Related Marketo documentation

http://developers.marketo.com/documentation/rest/get-last-7-days-usage/

Get Daily Errors

The  getDailyErrors operation Retrieves error codes and their count for the day.

getDailyErrors
<marketo.getDailyErrors/>
Sample Request

Following is a sample REST/JSON request that can be handled by the  getDailyErrors operation.

Sample request for getDailyErrors
{
    "marketoInstanceURL":"https://Abc-def-029.mktorest.com",
    "clientSecret":"Vgo6rzIiJyXXXXXXXP3Zr56tK2hv8fJd",
    "clientId":"01f22a42-0f05-4e7f-b675-550b6XXXXXXX1" 
}
Related Marketo documentation

http://developers.marketo.com/documentation/rest/get-daily-errors/

Get Last 7 Days Errors

The getLeadChanges retrieves error codes and their count for the last 7 days.

getLast7DaysErrors
<marketo.getLast7DaysErrors/>
Sample request 

Following is a sample REST/JSON request that can be handled by the getLast7DaysErrors operation.

Sample request for getLast7DaysErrors
{
    "marketoInstanceURL":"https://Abc-def-029.mktorest.com",
    "clientSecret":"Vgo6rzIiJyXXXXXXXP3Zr56tK2hv8fJd",
    "clientId":"01f22a42-0f05-4e7f-b675-550b6XXXXXXX1"
}
Related Marketo documentation

http://developers.marketo.com/documentation/rest/get-last-7-days-errors/

Sample Configuration

Following is a sample proxy service that illustrates how to connect to Marketo with the init operation and use the getLast7DaysUsage operation. The sample request for this proxy can be found in   getLast7DaysUsage sample request. You can use this sample as a template for using other operations in this category.

Sample proxy
<proxy xmlns="http://ws.apache.org/ns/synapse"
       name="getLast7DaysUsage"
       transports="https,http"
       statistics="disable"
       trace="disable"
       startOnLoad="true">
    <target>
        <inSequence>
            <property name="marketoInstanceURL" expression="json-eval($.marketoInstanceURL)"/>
            <property name="clientId" expression="json-eval($.clientId)"/>
            <property name="clientSecret" expression="json-eval($.clientSecret)"/>

            <marketo.init>
                <marketoInstanceURL>{$ctx:marketoInstanceURL}</marketoInstanceURL>
                <clientId>{$ctx:clientId}</clientId>
                <clientSecret>{$ctx:clientSecret}</clientSecret>
            </marketo.init>

            <marketo.getLast7DaysUsage/>

            <respond/>
        </inSequence>
        <outSequence>
            <log/>
            <send/>
        </outSequence>
    </target>
    <description/>
</proxy>


  • No labels