lib/API/MetricsApi.php
/**
     * Operation metricExport
     *
     * Query Event Data
     *
     * @param  string $metric_id metric_id (required)
     * @param  string $start_date Beginning of timeframe to pull event data for. The default value is 1 month ago. Can also accept a 10-digit UNIX timestamp. When sending a &#x60;start_date&#x60;, you must also send an &#x60;end_date&#x60;  Ex: &#x60;1610524800&#x60; OR &#x60;2021-01-13&#x60; (optional)
     * @param  string $end_date End of timeframe to pull event data for. The default is the current day, or 1 month from start_date, whichever is sooner. Can also accept a 10-digit UNIX timestamp. When sending an &#x60;end_date&#x60;, you must also send a &#x60;start_date&#x60;. Must be *at most* 31 days after &#x60;start_date&#x60;  Ex: &#x60;1612080000&#x60; OR &#x60;2021-01-31&#x60; (optional)
     * @param  string $unit Granularity to bucket data points into - one of &#x60;day&#x60;, &#x60;week&#x60;, or &#x60;month&#x60;. Defaults to &#x60;day&#x60;. (optional, default to 'day')
     * @param  string $measurement Type of metric to fetch - one of &#x60;unique&#x60;, &#x60;count&#x60;, &#x60;value&#x60;, or &#x60;sum&#x60;. Defaults to &#x60;count&#x60;. For &#x60;sum&#x60; a property name to operate on must be supplied as a JSON-encoded list like &#x60;[\&quot;sum\&quot;,\&quot;ItemCount\&quot;]&#x60; (optional, default to 'count')
     * @param  string $where Optional, JSON-encoded list. Conditions to use to filter the set of events. A max of 1 condition can be given. &#x60;where&#x60; and &#x60;by&#x60; parameters cannot be specified at the same time.  ex: &#x60;[[\&quot;$attributed_flow\&quot;,\&quot;&#x3D;\&quot;,\&quot;FLOW_ID\&quot;]]&#x60; (optional)
     * @param  string $by The name of a property to segment the event data on. &#x60;where&#x60; and &#x60;by&#x60; parameters cannot be specified at the same time. Cannot be used alongside &#x60;where&#x60; parameter. (optional)
     * @param  int $count Maximum number of segments to return. Default &#x3D; 25, **MAX &#x3D; 1000** (optional, default to 25)
     *
     * @throws \Klaviyo\ApiException on non-2xx response
     * @throws \InvalidArgumentException
     * @return array<string,object>
     */
Operation metricExport
Query Event Data

@param  string $metric_id metric_id (required)
@param  string $start_date Beginning of timeframe to pull event data for. The default value is 1 month ago. Can also accept a 10-digit UNIX timestamp.

@throws \Klaviyo\ApiException on non-2xx response
@throws \InvalidArgumentException
@return array
Operation metricExport Query Event Data @param string $metric_id metric_id ( required ) @param string $start_date Beginning of timeframe to pull event data for . The default value is 1 month ago . Can also accept a 10 - digit UNIX timestamp . @throws \ Klaviyo \ ApiException on non - 2xx response @throws \ InvalidArgumentException @return array
public function metricExport($metric_id, $start_date = null, $end_date = null, $unit = 'day', $measurement = 'count', $where = null, $by = null, $count = 25)
    {
        list($response) = $this->metricExportWithHttpInfo($metric_id, $start_date, $end_date, $unit, $measurement, $where, $by, $count);
        return $response;
    }
public function metricExport ( $ metric_id , $ start_date = null , $ end_date = null , $ unit = 'day' , $ measurement = 'count' , $ where = null , $ by = null , $ count = 25 ) { list ( $ response ) = $ this -> metricExportWithHttpInfo ( $ metric_id , $ start_date , $ end_date , $ unit , $ measurement , $ where , $ by , $ count ) ; return $ response ; }
Operation metricExport
 Query Event Data
Operation metricExport Query Event Data