---
title: "Trend of historical alerts (Beta)"
method: GET
path: "/orgs/{org_slug}/historical/alerts/trend"
tags: ["alerts"]
---

# Trend of historical alerts (Beta)

`GET /orgs/{org_slug}/historical/alerts/trend`

Trend analytics of historical alerts.

This endpoint consumes 10 units of your quota.

This endpoint requires the following org token scopes:
- historical:alerts-trend

## Path parameters

- `org_slug` string, required

## Query parameters

- `date` string
- `range` string
- `aggregation.fields` string
- `filters.alertAction` string
- `filters.alertAction.notIn` string
- `filters.alertActionSourceType` string
- `filters.alertActionSourceType.notIn` string
- `filters.alertCategory` string
- `filters.alertCategory.notIn` string
- `filters.alertCveId` string
- `filters.alertCveId.notIn` string
- `filters.alertCveTitle` string
- `filters.alertCveTitle.notIn` string
- `filters.alertCweId` string
- `filters.alertCweId.notIn` string
- `filters.alertCweName` string
- `filters.alertCweName.notIn` string
- `filters.alertEPSS` string
- `filters.alertEPSS.notIn` string
- `filters.alertFixType` string
- `filters.alertFixType.notIn` string
- `filters.alertKEV` boolean
- `filters.alertKEV.notIn` boolean
- `filters.alertPriority` string
- `filters.alertPriority.notIn` string
- `filters.alertReachabilityAnalysisType` string
- `filters.alertReachabilityAnalysisType.notIn` string
- `filters.alertReachabilityType` string
- `filters.alertReachabilityType.notIn` string
- `filters.alertSeverity` string
- `filters.alertSeverity.notIn` string
- `filters.alertType` string
- `filters.alertType.notIn` string
- `filters.artifactName` string
- `filters.artifactName.notIn` string
- `filters.artifactType` string
- `filters.artifactType.notIn` string
- `filters.branch` string
- `filters.branch.notIn` string
- `filters.cvePatchStatus` string
- `filters.cvePatchStatus.notIn` string
- `filters.dependencyDead` boolean
- `filters.dependencyDead.notIn` boolean
- `filters.dependencyDev` boolean
- `filters.dependencyDev.notIn` boolean
- `filters.dependencyDirect` boolean
- `filters.dependencyDirect.notIn` boolean
- `filters.repoFullName` string
- `filters.repoFullName.notIn` string
- `filters.repoLabels` string
- `filters.repoLabels.notIn` string
- `filters.repoSlug` string
- `filters.repoSlug.notIn` string

## Response `200`

The trend data

- object
  - `meta` object, required
    - `organizationId` string, required
    - `startDateInclusive` string, required
    - `endDateInclusive` string, required
    - `interval` string, required
    - `aggregation` object, required
      - `fields` string[], required
      - `groups` array[], required
        - string[]
    - `filters` object, required
      - `alertAction` string[] — Comma-separated list of alert actions ("error", "warn", "monitor", or "ignore) that should be included
      - `alertAction.notIn` string[] — Comma-separated list of alert actions ("error", "warn", "monitor", or "ignore) that should be excluded
      - `alertActionSourceType` string[] — Comma-separated list of alert action source types ("resolution", "alert-policy", "fallback", "injected-alert", "org-policy", "reachability", "repo-label-policy", "socket-yml", or "triage") that should be included
      - `alertActionSourceType.notIn` string[] — Comma-separated list of alert action source types ("resolution", "alert-policy", "fallback", "injected-alert", "org-policy", "reachability", "repo-label-policy", "socket-yml", or "triage") that should be excluded
      - `alertCategory` string[] — Comma-separated list of alert categories ("supplyChainRisk", "maintenance", "quality", "license", or "vulnerability") that should be included
      - `alertCategory.notIn` string[] — Comma-separated list of alert categories ("supplyChainRisk", "maintenance", "quality", "license", or "vulnerability") that should be excluded
      - `alertCveId` string[] — CVE ID
      - `alertCveId.notIn` string[] — CVE ID
      - `alertCveTitle` string[] — CVE title
      - `alertCveTitle.notIn` string[] — CVE title
      - `alertCweId` string[] — CWE ID
      - `alertCweId.notIn` string[] — CWE ID
      - `alertCweName` string[] — CWE name
      - `alertCweName.notIn` string[] — CWE name
      - `alertEPSS` string[] — Alert EPSS ("low", "medium", "high", "critical")
      - `alertEPSS.notIn` string[] — Alert EPSS ("low", "medium", "high", "critical")
      - `alertFixType` string[] — Comma-separated list of alert fix types ("upgrade", "cve", or "remove") that should be included
      - `alertFixType.notIn` string[] — Comma-separated list of alert fix types ("upgrade", "cve", or "remove") that should be excluded
      - `alertKEV` boolean[] — Alert KEV (Known Exploited Vulnerability) filter flag
      - `alertPriority` string[] — Alert priority ("low", "medium", "high", or "critical")
      - `alertPriority.notIn` string[] — Alert priority ("low", "medium", "high", or "critical")
      - `alertReachabilityAnalysisType` string[] — Comma-separated list of alert CVE reachability analysis types ("full-scan" or "precomputed") that should be included
      - `alertReachabilityAnalysisType.notIn` string[] — Comma-separated list of alert CVE reachability analysis types ("full-scan" or "precomputed") that should be excluded
      - `alertReachabilityType` string[] — Comma-separated list of alert CVE reachability types ("direct_dependency", "error", "maybe_reachable", "missing_support", "pending", "reachable", "undeterminable_reachability", "unknown", or "unreachable") that should be included
      - `alertReachabilityType.notIn` string[] — Comma-separated list of alert CVE reachability types ("direct_dependency", "error", "maybe_reachable", "missing_support", "pending", "reachable", "undeterminable_reachability", "unknown", or "unreachable") that should be excluded
      - `alertSeverity` string[] — Comma-separated list of alert severities ("low", "medium", "high", or "critical") that should be included
      - `alertSeverity.notIn` string[] — Comma-separated list of alert severities ("low", "medium", "high", or "critical") that should be excluded
      - `alertType` string[] — Comma-separated list of alert types (e.g. "usesEval", "unmaintained", etc.) that should be included
      - `alertType.notIn` string[] — Comma-separated list of alert types (e.g. "usesEval", "unmaintained", etc.) that should be excluded
      - `artifactName` string[] — Name of artifact
      - `artifactName.notIn` string[] — Name of artifact
      - `artifactType` string[] — Comma-separated list of artifact types (e.g. "npm", "pypi", "gem", "maven", "golang", etc.) that should be included
      - `artifactType.notIn` string[] — Comma-separated list of artifact types (e.g. "npm", "pypi", "gem", "maven", "golang", etc.) that should be excluded
      - `branch` string[] — Comma-separated list of branch names that should be included
      - `branch.notIn` string[] — Comma-separated list of branch names that should be excluded
      - `cvePatchStatus` string[] — Comma-separated list of patch statuses ("patch_unavailable", "patch_available", or "patch_applied") that should be included
      - `cvePatchStatus.notIn` string[] — Comma-separated list of patch statuses ("patch_unavailable", "patch_available", or "patch_applied") that should be excluded
      - `dependencyDead` boolean[] — Dead/reachable dependency filter flag
      - `dependencyDev` boolean[] — Development/production dependency filter flag
      - `dependencyDirect` boolean[] — Direct/transitive dependency filter flag
      - `repoFullName` string[] — Comma-separated list of repo full names that should be included
      - `repoFullName.notIn` string[] — Comma-separated list of repo full names that should be excluded
      - `repoLabels` string[] — Comma-separated list of repo labels that should be included. Use "" to filter for repositories with no labels.
      - `repoLabels.notIn` string[] — Comma-separated list of repo labels that should be excluded. Use "" to filter for repositories with no labels.
      - `repoSlug` string[] — Comma-separated list of repo slugs that should be included
      - `repoSlug.notIn` string[] — Comma-separated list of repo slugs that should be excluded
  - `items` object[], required
    - `date` string, required
    - `startOfDayTimestamp` number, required
    - `dataPoints` object[], required
      - `aggregationGroup` string[], required
      - `count` integer, required
      - `countDelta` integer, required

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `403` — Insufficient max_quota for API method
- `404` — Resource not found
- `429` — Insufficient quota for API route

---

[API](https://skmtc.dev/socket-dev/apis/socket.md) · [All operations](https://skmtc.dev/socket-dev/apis/socket/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/socket-dev/socket/revisions/bf994b75d33f/schema)
