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

# Get the ThreatDown active detections, optionally narrowed by a filter

> Return the ThreatDown active detections, newest scan first unless `sort` says otherwise, one page as JSON (`data`, `pagination`): each with its `detectionId`, `threatName`, `category`, `types`, `scannedAt`, the Primo device it matched (`deviceId`, `deviceName`, null when no device matched), the id of the device owner (`employeeId`, resolve it with `getEmployees`) and its `consoleLink`. Narrow it with `filter`, whose keys (`category`, `type`, `deviceId`, `employeeId`, `scannedAt`) each take a clause `{ "operationType": "INCLUDE" | "EXCLUDE", "values": [...] }`, ANDed unless `matchAnyFilters` is true, and `search` on the threat name. Example, the malware found in the last 7 days: `{"filter":{"category":{"operationType":"INCLUDE","values":["Malware"]},"scannedAt":{"operationType":"INCLUDE","values":["UNDER_24_HOURS","ONE_TO_SEVEN_DAYS"]}}}`. For the counts alone (total, per category, devices affected), `getThreatDownActiveDetectionsSummary`. ThreatDown active detections are the threats ThreatDown still finds on the company's devices, as Primo stored them at its last sync (every 5 minutes, once the company turned the alert sync on; a company without it has none). A detection leaves the list once ThreatDown no longer reports it. They are not the SentinelOne alerts (`getSentinelOneAlerts`), the MDM compliance alerts (`getComplianceAlerts`) nor the AI tools risks (`getAiFindings`).

Key: ReadScope: Company


## OpenAPI

````yaml https://api.getprimo.com/openapi.json post /edr/threatdown/active-detections/search
openapi: 3.1.1
info:
  title: Public API - BETA
  description: Read docs on https://docs.getprimo.com/
  version: '1.0'
  contact: {}
servers:
  - url: https://api.getprimo.com
security:
  - apikey: []
tags: []
paths:
  /edr/threatdown/active-detections/search:
    post:
      tags:
        - Edr
      summary: Get the ThreatDown active detections, optionally narrowed by a filter
      description: >-
        Return the ThreatDown active detections, newest scan first unless `sort`
        says otherwise, one page as JSON (`data`, `pagination`): each with its
        `detectionId`, `threatName`, `category`, `types`, `scannedAt`, the Primo
        device it matched (`deviceId`, `deviceName`, null when no device
        matched), the id of the device owner (`employeeId`, resolve it with
        `getEmployees`) and its `consoleLink`. Narrow it with `filter`, whose
        keys (`category`, `type`, `deviceId`, `employeeId`, `scannedAt`) each
        take a clause `{ "operationType": "INCLUDE" | "EXCLUDE", "values": [...]
        }`, ANDed unless `matchAnyFilters` is true, and `search` on the threat
        name. Example, the malware found in the last 7 days:
        `{"filter":{"category":{"operationType":"INCLUDE","values":["Malware"]},"scannedAt":{"operationType":"INCLUDE","values":["UNDER_24_HOURS","ONE_TO_SEVEN_DAYS"]}}}`.
        For the counts alone (total, per category, devices affected),
        `getThreatDownActiveDetectionsSummary`. ThreatDown active detections are
        the threats ThreatDown still finds on the company's devices, as Primo
        stored them at its last sync (every 5 minutes, once the company turned
        the alert sync on; a company without it has none). A detection leaves
        the list once ThreatDown no longer reports it. They are not the
        SentinelOne alerts (`getSentinelOneAlerts`), the MDM compliance alerts
        (`getComplianceAlerts`) nor the AI tools risks (`getAiFindings`).
      operationId: getThreatDownActiveDetections
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetThreatDownActiveDetectionsBody'
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetThreatDownActiveDetections_Output'
components:
  schemas:
    GetThreatDownActiveDetectionsBody:
      type: object
      properties:
        filter:
          description: >-
            Each key a clause `{ "operationType": "INCLUDE" | "EXCLUDE",
            "values": [...] }`
          type: object
          properties:
            category:
              description: 'ThreatDown categories: Malware, PUP, PUM…'
              type: object
              properties:
                operationType:
                  type: string
                  enum:
                    - INCLUDE
                    - EXCLUDE
                values:
                  minItems: 1
                  type: array
                  items:
                    type: string
                    minLength: 1
              required:
                - operationType
                - values
            type:
              description: 'ThreatDown item types: file, folder, registry key…'
              type: object
              properties:
                operationType:
                  type: string
                  enum:
                    - INCLUDE
                    - EXCLUDE
                values:
                  minItems: 1
                  type: array
                  items:
                    type: string
                    minLength: 1
              required:
                - operationType
                - values
            deviceId:
              type: object
              properties:
                operationType:
                  type: string
                  enum:
                    - INCLUDE
                    - EXCLUDE
                values:
                  minItems: 1
                  type: array
                  items:
                    type: string
                    minLength: 1
                    maxLength: 100
              required:
                - operationType
                - values
            employeeId:
              description: The current owner of the detection's device
              type: object
              properties:
                operationType:
                  type: string
                  enum:
                    - INCLUDE
                    - EXCLUDE
                values:
                  minItems: 1
                  type: array
                  items:
                    type: string
                    minLength: 1
                    maxLength: 100
              required:
                - operationType
                - values
            scannedAt:
              description: When ThreatDown found the item, as relative buckets
              type: object
              properties:
                operationType:
                  type: string
                  enum:
                    - INCLUDE
                    - EXCLUDE
                values:
                  minItems: 1
                  type: array
                  items:
                    type: string
                    enum:
                      - UNDER_24_HOURS
                      - ONE_TO_SEVEN_DAYS
                      - SEVEN_TO_THIRTY_DAYS
                      - THIRTY_TO_NINETY_DAYS
                      - OVER_NINETY_DAYS
              required:
                - operationType
                - values
          additionalProperties: false
        matchAnyFilters:
          description: >-
            Whether a detection matching one clause of `filter` is enough,
            instead of all of them (the search still applies)
          type: boolean
        search:
          description: Part of the threat name, case-insensitive
          type: string
          maxLength: 200
        sort:
          description: Newest scan first by default
          type: object
          properties:
            column:
              type: string
              enum:
                - scannedAt
                - threatName
            direction:
              type: string
              enum:
                - ASC
                - DESC
          required:
            - column
            - direction
        page:
          default: 1
          type: integer
          minimum: 1
          maximum: 9007199254740991
        perPage:
          default: 50
          type: integer
          minimum: 1
          maximum: 100
    GetThreatDownActiveDetections_Output:
      type: object
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              detectionId:
                description: ThreatDown's id of the detection
                type: string
              threatName:
                anyOf:
                  - type: string
                  - type: 'null'
              category:
                description: 'The ThreatDown category: `Malware`, `PUP`, `PUM`…'
                anyOf:
                  - type: string
                  - type: 'null'
              types:
                description: 'The ThreatDown item types: file, folder, registry key…'
                type: array
                items:
                  type: string
              scannedAt:
                description: When ThreatDown found the item
                anyOf:
                  - type: string
                    format: date-time
                    pattern: >-
                      ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                  - type: 'null'
              deviceId:
                description: The Primo device the detection matched; null when none did
                anyOf:
                  - type: string
                  - type: 'null'
              deviceName:
                anyOf:
                  - type: string
                  - type: 'null'
              employeeId:
                description: The device's current owner
                anyOf:
                  - type: string
                  - type: 'null'
              consoleLink:
                description: The ThreatDown console of the company
                anyOf:
                  - type: string
                  - type: 'null'
            required:
              - detectionId
              - threatName
              - category
              - types
              - scannedAt
              - deviceId
              - deviceName
              - employeeId
              - consoleLink
            additionalProperties: false
        pagination:
          type: object
          properties:
            totalElements:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            totalPages:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            page:
              type: integer
              minimum: 1
              maximum: 9007199254740991
            perPage:
              type: integer
              minimum: 1
              maximum: 100
          required:
            - totalElements
            - totalPages
            - page
            - perPage
          additionalProperties: false
      required:
        - data
        - pagination
      additionalProperties: false
  securitySchemes:
    apikey:
      scheme: bearer
      bearerFormat: API key
      type: http
      description: >-
        Use your Primo API key in the Authorization header as `Bearer
        <API_KEY>`.

````

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