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

# Get reporting incident flow



## OpenAPI

````yaml /api-reference/openapi.json post /api/v2/reporting/incident-flow
openapi: 3.1.1
info:
  title: ContraForce API
  description: ContraForce platform API for security operations management.
  version: '2.0'
servers: []
security: []
tags:
  - name: Incidents
  - name: Gamebooks
  - name: Data sources
  - name: Service tickets
  - name: Investigation
  - name: Export
  - name: agent-tools
  - name: Cross-workspace incidents
  - name: Cross-workspace gamebooks
  - name: Cross-workspace data sources
  - name: Webhooks
  - name: Service accounts
  - name: Users
  - name: Azure resources
  - name: Reporting
paths:
  /api/v2/reporting/incident-flow:
    post:
      tags:
        - Reporting
      summary: Get reporting incident flow
      operationId: v2-get-reporting-incident-flow
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReportingReadRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponseOfIncidentFlowReportResponse'
        '400':
          description: Bad request — validation or parameter binding failed.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ApiProblemDetails'
        '401':
          description: Unauthorized — missing or invalid Bearer token.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ApiProblemDetails'
        '403':
          description: Forbidden — insufficient scope or workspace access.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ApiProblemDetails'
        '404':
          description: Not found — workspace or resource is missing.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ApiProblemDetails'
        '500':
          description: Internal server error.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ApiProblemDetails'
components:
  schemas:
    ReportingReadRequest:
      required:
        - from
        - to
      type: object
      properties:
        from:
          type: string
          description: >-
            The first day of the range, inclusive (UTC days). A range spans at
            most 366 days.
          format: date
        to:
          type: string
          description: The last day of the range, inclusive (UTC days).
          format: date
        workspaceIds:
          type:
            - 'null'
            - array
          items:
            type: string
            format: uuid
          description: >-
            The workspaces to read, at most 500; `null` or empty reads every
            workspace the caller may see. A service

            account sees the workspaces it holds a role on.
      description: The day range and workspace selection every reporting read takes.
    ApiResponseOfIncidentFlowReportResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/IncidentFlowReportResponse'
          description: v2 incident flow totals for a date range and workspace selection.
        meta:
          $ref: '#/components/schemas/ResponseMeta'
      description: Standard v2 API response envelope for single-item responses.
    ApiProblemDetails:
      type: object
      properties:
        type:
          type:
            - 'null'
            - string
        title:
          type:
            - 'null'
            - string
        status:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - 'null'
            - integer
            - string
          format: int32
        detail:
          type:
            - 'null'
            - string
        instance:
          type:
            - 'null'
            - string
        code:
          type:
            - 'null'
            - string
        requestId:
          type:
            - 'null'
            - string
        timestamp:
          type:
            - 'null'
            - string
        target:
          type:
            - 'null'
            - string
        errors:
          type:
            - 'null'
            - object
          additionalProperties:
            type: array
            items:
              type: string
      description: >-
        API extension of ProblemDetails that surfaces the stable error code,

        trace identifier, timestamp, optional target, and optional field-keyed
        validation

        error map alongside the RFC 7807 members.
    IncidentFlowReportResponse:
      type: object
      properties:
        received:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - integer
            - string
          description: Incidents detected in the range.
          format: int32
        closed:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - integer
            - string
          description: Incident closures in the range, counted once per incident per day.
          format: int32
        closedBy:
          type:
            - 'null'
            - object
          additionalProperties:
            pattern: ^-?(?:0|[1-9]\d*)$
            type:
              - integer
              - string
            format: int32
          description: 'Closures by who closed them: Agent, Analyst or Upstream.'
        investigated:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - integer
            - string
          description: Incidents whose latest agent run finished in the range.
          format: int32
        outcomes:
          type:
            - 'null'
            - object
          additionalProperties:
            pattern: ^-?(?:0|[1-9]\d*)$
            type:
              - integer
              - string
            format: int32
          description: >-
            Outcome of each investigated incident's latest run: ResolvedByAgent,
            Escalated, NoChange, Failed or CompletedNoVerdict.
        medianTimeToCloseSeconds:
          pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$
          type:
            - 'null'
            - number
            - string
          description: Median seconds from detection to closure, when detections are known.
          format: double
        closedBySeverity:
          type:
            - 'null'
            - object
          additionalProperties:
            pattern: ^-?(?:0|[1-9]\d*)$
            type:
              - integer
              - string
            format: int32
          description: Closures by the incident's severity.
        closedByRule:
          type:
            - 'null'
            - array
          items:
            $ref: '#/components/schemas/ReportingRuleCountResponse'
            description: Closures counted under one detection rule.
          description: >-
            The detection rules with the most closures, most first; each rule is
            the incident title it is counted under.
        closedByOtherRules:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - integer
            - string
          description: Closures under every other rule together; a remainder, never a rule.
          format: int32
        granularity:
          type:
            - 'null'
            - string
          description: >-
            `day` for ranges up to 92 days, otherwise `month`; the grain of
            List&lt;IncidentFlowPointResponse&gt;
            IncidentFlowReportResponse.Points.
        points:
          type:
            - 'null'
            - array
          items:
            $ref: '#/components/schemas/IncidentFlowPointResponse'
            description: Incident flow totals for one day or month.
          description: >-
            One point per day or month, oldest first, for the trend behind the
            totals.
        read:
          $ref: '#/components/schemas/ReportingReadInfoResponse'
          description: How the response was read.
      description: v2 incident flow totals for a date range and workspace selection.
    ResponseMeta:
      type: object
      properties:
        requestId:
          type:
            - 'null'
            - string
        timestamp:
          type:
            - 'null'
            - string
    ReportingRuleCountResponse:
      required:
        - rule
        - closed
      type: object
      properties:
        rule:
          type:
            - 'null'
            - string
          description: >-
            The incident title the closures are counted under; pass it as `rule`
            to open them.
        closed:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - integer
            - string
          description: Closures in the range.
          format: int32
      description: Closures counted under one detection rule.
    IncidentFlowPointResponse:
      type: object
      properties:
        date:
          type:
            - 'null'
            - string
          description: '`yyyy-MM-dd` or `yyyy-MM`.'
        received:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - integer
            - string
          format: int32
        closed:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - integer
            - string
          format: int32
        closedBy:
          type:
            - 'null'
            - object
          additionalProperties:
            pattern: ^-?(?:0|[1-9]\d*)$
            type:
              - integer
              - string
            format: int32
          description: >-
            The bucket's closures by who closed them: `Agent`, `Analyst` or
            `Upstream`.
        investigated:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - integer
            - string
          format: int32
        medianTimeToCloseSeconds:
          pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$
          type:
            - 'null'
            - number
            - string
          description: >-
            Median seconds from detection to closure in this bucket, when
            detections are known.
          format: double
      description: Incident flow totals for one day or month.
    ReportingReadInfoResponse:
      type: object
      properties:
        scope:
          type:
            - 'null'
            - string
          description: >-
            `account` when account-wide totals were read, otherwise
            `workspaces`.
        workspaceCount:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - integer
            - string
          description: Workspaces the response covers.
          format: int32
        documentsRead:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - integer
            - string
          description: >-
            Aggregate documents read to build the response (0 when served from
            cache).
          format: int32
        fromCache:
          type: boolean
          description: Whether the response came from the in-memory cache.
        authorizeMs:
          pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$
          type:
            - number
            - string
          description: >-
            Milliseconds this request spent validating the range and checking
            workspace access.
          format: double
        readMs:
          pattern: ^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$
          type:
            - number
            - string
          description: >-
            Milliseconds spent loading aggregate documents (0 when served from
            cache).
          format: double
      description: How a reporting response was read, for load testing and diagnosis.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.