> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mindfort.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Metrics Timeseries

<Info>Required API key permission: `metrics:read`.</Info>


## OpenAPI

````yaml /openapi.json get /v1/findings/metrics/timeseries
openapi: 3.1.0
info:
  title: MindFort API
  version: 1.0.0
  description: >-
    The MindFort Public API supports targets, assessments, finding lifecycle and
    analytics, and reports. Public responses use positive field allowlists and
    call informational non-vulnerable results `secured`.
servers:
  - url: https://api.mindfort.app
    description: Production
security:
  - bearerAuth: []
paths:
  /v1/findings/metrics/timeseries:
    get:
      tags:
        - Analytics
      summary: Get Metrics Timeseries
      operationId: getSecurityMetricsTimeseries
      parameters:
        - name: target_id
          in: query
          required: false
          description: Optionally scope organization-wide results to one target
          schema:
            type: string
            format: uuid
        - name: from
          in: query
          required: true
          description: Start date, inclusive
          schema:
            type: string
            format: date
        - name: to
          in: query
          required: true
          description: End date, inclusive
          schema:
            type: string
            format: date
        - name: granularity
          in: query
          required: false
          schema:
            type: string
            enum:
              - day
              - week
            default: day
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicTimeseriesMetrics'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Not permitted for this organization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    PublicTimeseriesMetrics:
      properties:
        target_id:
          title: Target Id
          type:
            - string
            - 'null'
          format: uuid
        org_wide:
          type: boolean
          title: Org Wide
        granularity:
          type: string
          enum:
            - day
            - week
          title: Granularity
        date_from:
          type: string
          format: date
          title: Date From
        date_to:
          type: string
          format: date
          title: Date To
        data:
          items:
            $ref: '#/components/schemas/PublicTimeseriesPoint'
          type: array
          title: Data
      type: object
      required:
        - org_wide
        - granularity
        - date_from
        - date_to
        - data
      title: PublicTimeseriesMetrics
      additionalProperties: false
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Human-readable error message
        request_id:
          type: string
          description: Unique request identifier for debugging
    PublicTimeseriesPoint:
      properties:
        date:
          type: string
          format: date
          title: Date
        open:
          $ref: '#/components/schemas/PublicSeverityCounts'
        new:
          $ref: '#/components/schemas/PublicSeverityCounts'
        resolved:
          $ref: '#/components/schemas/PublicSeverityCounts'
        net_new:
          type: integer
          title: Net New
          default: 0
      type: object
      required:
        - date
        - open
        - new
        - resolved
      title: PublicTimeseriesPoint
      additionalProperties: false
    PublicSeverityCounts:
      properties:
        total:
          type: integer
          title: Total
          default: 0
        critical:
          type: integer
          title: Critical
          default: 0
        high:
          type: integer
          title: High
          default: 0
        medium:
          type: integer
          title: Medium
          default: 0
        low:
          type: integer
          title: Low
          default: 0
        secured:
          type: integer
          title: Secured
          default: 0
      type: object
      title: PublicSeverityCounts
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key generated from the MindFort dashboard. Pass as `Authorization:
        Bearer <your-api-key>`.

````