:doc:`CodeGuruSecurity <../../codeguru-security>` / Client / get_metrics_summary

*******************
get_metrics_summary
*******************



.. py:method:: CodeGuruSecurity.Client.get_metrics_summary(**kwargs)

  

  Returns a summary of metrics for an account from a specified date, including number of open findings, the categories with most findings, the scans with most open findings, and scans with most open critical findings.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/codeguru-security-2018-05-10/GetMetricsSummary>`_  


  **Request Syntax**
  ::

    response = client.get_metrics_summary(
        date=datetime(2015, 1, 1)
    )
    
  :type date: datetime
  :param date: **[REQUIRED]** 

    The date you want to retrieve summary metrics from, rounded to the nearest day. The date must be within the past two years.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'metricsSummary': {
              'date': datetime(2015, 1, 1),
              'openFindings': {
                  'info': 123.0,
                  'low': 123.0,
                  'medium': 123.0,
                  'high': 123.0,
                  'critical': 123.0
              },
              'categoriesWithMostFindings': [
                  {
                      'categoryName': 'string',
                      'findingNumber': 123
                  },
              ],
              'scansWithMostOpenFindings': [
                  {
                      'scanName': 'string',
                      'findingNumber': 123
                  },
              ],
              'scansWithMostOpenCriticalFindings': [
                  {
                      'scanName': 'string',
                      'findingNumber': 123
                  },
              ]
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **metricsSummary** *(dict) --* 

        The summary metrics from the specified date.

        
        

        - **date** *(datetime) --* 

          The date from which the metrics summary information was retrieved.

          
        

        - **openFindings** *(dict) --* 

          The number of open findings of each severity.

          
          

          - **info** *(float) --* 

            A numeric value corresponding to an informational finding.

            
          

          - **low** *(float) --* 

            A numeric value corresponding to a low severity finding.

            
          

          - **medium** *(float) --* 

            A numeric value corresponding to a medium severity finding.

            
          

          - **high** *(float) --* 

            A numeric value corresponding to a high severity finding.

            
          

          - **critical** *(float) --* 

            A numeric value corresponding to a critical finding.

            
      
        

        - **categoriesWithMostFindings** *(list) --* 

          A list of ``CategoryWithFindingNum`` objects for the top 5 finding categories with the most findings.

          
          

          - *(dict) --* 

            Information about a finding category with open findings.

            
            

            - **categoryName** *(string) --* 

              The name of the finding category. A finding category is determined by the detector that detected the finding.

              
            

            - **findingNumber** *(integer) --* 

              The number of open findings in the category.

              
        
      
        

        - **scansWithMostOpenFindings** *(list) --* 

          A list of ``ScanNameWithFindingNum`` objects for the top 3 scans with the most number of open findings.

          
          

          - *(dict) --* 

            Information about the number of findings generated by a scan.

            
            

            - **scanName** *(string) --* 

              The name of the scan.

              
            

            - **findingNumber** *(integer) --* 

              The number of findings generated by a scan.

              
        
      
        

        - **scansWithMostOpenCriticalFindings** *(list) --* 

          A list of ``ScanNameWithFindingNum`` objects for the top 3 scans with the most number of open critical findings.

          
          

          - *(dict) --* 

            Information about the number of findings generated by a scan.

            
            

            - **scanName** *(string) --* 

              The name of the scan.

              
            

            - **findingNumber** *(integer) --* 

              The number of findings generated by a scan.

              
        
      
    
  
  **Exceptions**
  
  *   :py:class:`CodeGuruSecurity.Client.exceptions.InternalServerException`

  
  *   :py:class:`CodeGuruSecurity.Client.exceptions.ThrottlingException`

  
  *   :py:class:`CodeGuruSecurity.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`CodeGuruSecurity.Client.exceptions.ValidationException`

  