code: def metric_data(
              self, id, names, values=None, from_dt=None, to_dt=None,
              summarize=False):
          
          params = [
              'from={0}'.format(from_dt) if from_dt else None,
              'to={0}'.format(to_dt) if to_dt else None,
              'summarize=true' if summarize else None
          ]
  
          params += ['names[]={0}'.format(name) for name in names]
          if values:
              params += ['values[]={0}'.format(value) for value in values]
  
          return self._get(
              url='{0}components/{1}/metrics/data.json'.format(self.URL, id),
              headers=self.headers,
              params=self.build_param_string(params)
          )
docs: This API endpoint returns a list of values for each of the requested
          metrics. The list of available metrics can be returned using the Metric
          Name API endpoint.
  
          Metric data can be filtered by a number of parameters, including
          multiple names and values, and by time range. Metric names and values
          will be matched intelligently in the background.
  
          You can also retrieve a summarized data point across the entire time
          range selected by using the summarize parameter.
  
          **Note** All times sent and received are formatted in UTC. The default
          time range is the last 30 minutes.
  
          :type id: int
          :param id: Component ID
  
          :type names: list of str
          :param names: Retrieve specific metrics by name
  
          :type values: list of str
          :param values: Retrieve specific metric values
  
          :type from_dt: datetime
          :param from_dt: Retrieve metrics after this time
  
          :type to_dt: datetime
          :param to_dt: Retrieve metrics before this time
  
          :type summarize: bool
          :param summarize: Summarize the data
  
          :rtype: dict
          :return: The JSON response of the API
  
          ::
  
              {
                  "metric_data": {
                      "from": "time",
                      "to": "time",
                      "metrics": [
                          {
                              "name": "string",
                              "timeslices": [
                                  {
                                      "from": "time",
                                      "to": "time",
                                      "values": "hash"
                                  }
                              ]
                          }
                      ]
                  }
              }