Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejs
{
    "timeDimension": "HOURLY", 		// Equivalent of Time Level in UI reporting.  Values are OVERALL, MONTHLY, DAILY, HOURLY.
    "reportType": ["PARTNER","SITE","COUNTRY"],  	// Equivalent of Dimensions in UI reporting.  Up to 5 dimensions can be included per request. See Dimension Mapping below for all options. 
    "reportFormat": "JSON",			// The format of the report output. Values are JSON, CSV.
    "startDate": "2017-07-07",		// Required. These are in America/New_York timezone by default.
    "endDate": "2017-07-07",		// Required. These are in America/New_York timezone by default.
	"startHour": 5, 				// Optional. This property should only be included when timeDimension value is HOURLY. Value must be an Int (not String).
	"endHour": 19,			 		// Optional. This property should only be included when timeDimension value is HOURLY. Value must be an Int (not String).
	"timezone": "UTC", 				// "UTC" and "America/New_York" currently supported
	"filters": [{					// Optional.  Applies filters to your output.
		 "dimension": "SITE", 		// The dimension the filter applies to.
		 "operation": "include",    // The operation of the filter.  Values are 'include' and 'exclude'.
		 "filters": [{				// The match type of the value.  Use "id" for entity IDs and "partial" for wildcard filtering by entity name.
		 	"matchType": "id", 	 	// This example filter includes records where Supply Source ID is 105350 or 105351.
		 	"value": "105350"		
		 },{
		 	"matchType": "id",
		 	"value": "105351"
		 }]},{
		 "dimension": "SITE",
		 "operation": "include",
		 "filters": [{
		 	"matchType": "partial",	// This example filters for Supply Sources with "high" in the name.
		 	"value": "high"
		}]},{
		 "dimension": "COUNTRY", 	// This example filters by Country ID "US".
		 "operation": "include",
		 "filters": [{
		 	"matchType": "id",
		 	"value": "US"}]
				}],
	"metrics": ["OPPORTUNITIES","IMPRESSIONS","REVENUE","CLICKS"],  // Optional. If the metric property is excluded from a request, all applicable default metrics will be returned in the output.  Default metrics are defined as those that are pre-selected in the UI based on the report's dimension selections.
    "sort": [{ 					// This example sorts by Dimension 1 (Supply Partner) descending, then Ad Opportunities descending.					
        "field": "SITE", 		// The column sorting will be applied to. Values are the dimension and metric strings listed in the tabled below.
        "order": "desc"			// The direction of the sort. Values are asc, desc.
    		},{
  		"field": "REVENUE",
  		"order": "desc"
 			}],
	"limit": 100,			// Optional. The max number rows that will be returned in your output.  
	"offset": 0				// Optional. Including this property will match the first record of you output to the specified record number.  Not applicable for reportFormat type CSV.  The default value is 0.  
}

...