lib/serverdensity/Api/Metrics.php
public function dynamicMetrics($filter, $start, $end, $inventoryFilter=Null){
        $urlencoded = '';
        $query = array();
        if (isset($inventoryFilter)){
            $query['inventoryFilter'] = $inventoryFilter;
        }
        if (!empty($query)){
            $urlencoded = '?' . http_build_query($query);
        }

        $param = array(
            'start' => date("Y-m-d\TH:i:s\Z", $start),
            'end' => date("Y-m-d\TH:i:s\Z", $end),
            'filter' => $filter
        );

        $param = $this->makeJsonReady($param);

        return $this->get('metrics/dynamicgraphs/' . $urlencoded, $param);
    }
public function dynamicMetrics($filter, $start, $end, $inventoryFilter=Null){
        $urlencoded = '';
        $query = array();
        if (isset($inventoryFilter)){
            $query['inventoryFilter'] = $inventoryFilter;
        }
        if (!empty($query)){
            $urlencoded = '?' . http_build_query($query);
        }

        $param = array(
            'start' => date("Y-m-d\TH:i:s\Z", $start),
            'end' => date("Y-m-d\TH:i:s\Z", $end),
            'filter' => $filter
        );

        $param = $this->makeJsonReady($param);

        return $this->get('metrics/dynamicgraphs/' . $urlencoded, $param);
    }
public function dynamicMetrics ( $ filter , $ start , $ end , $ inventoryFilter = Null ) { $ urlencoded = '' ; $ query = array ( ) ; if ( isset ( $ inventoryFilter ) ) { $ query [ 'inventoryFilter' ] = $ inventoryFilter ; } if ( ! empty ( $ query ) ) { $ urlencoded = '?' . http_build_query ( $ query ) ; } $ param = array ( 'start' => date ( "Y-m-d\TH:i:s\Z" , $ start ) , 'end' => date ( "Y-m-d\TH:i:s\Z" , $ end ) , 'filter' => $ filter ) ; $ param = $ this -> makeJsonReady ( $ param ) ; return $ this -> get ( 'metrics/dynamicgraphs/' . $ urlencoded , $ param ) ; }
Get dynamic metrics
@link     https://developer.serverdensity.com/docs/dynamic-metrics
@param    array       $filter an array of what you want to filter
@param    timestamp   $start  the start of the period.
@param    timestamp   $end    the end of the period
@param    string      $inventoryFilter the filter to use to find inventory
@param    array       $ids an array of ids that you want to filter for.
@param    array       $names an array of names that you would like to filter for.
@return   an array that is all available metrics.
Get dynamic metrics