---
title: "Analyze District Cases From Alert"
method: GET
path: "/analyze-district-cases/from-alert/{alert_id}"
tags: ["Federal District Cases", "Analytics"]
---

# Analyze District Cases From Alert

`GET /analyze-district-cases/from-alert/{alert_id}`

## Request

- Base URL: `https://api.lexmachina.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.lexmachina.com/analyze-district-cases/from-alert/{alert_id}`
- Auth: HTTP bearer

## Path parameters

- `alert_id` integer, required

## Query parameters

- `analytic_type` 'CaseCountByType' | 'PartyCountByRole' | 'LawFirmCountByRole', required
- `on_or_after` string, date, nullable: alert start date
- `on_or_before` string, date, nullable: alert end date

## Response `200`

Success

- CaseAnalyticResult
  - `totalCases` integer, required
  - `aggregation` union, required
    - CaseTypeAggregation
      - `data` CaseCountByType[], required
        - `caseType` string, required
        - `count` integer, required
    - PartyAggregation
      - `data` PartyCountByRole[], required
        - `partyId` integer, required
        - `partyName` string, required
        - `rolesAndCounts` CountsPerRole[], required
          - `role` string, required
          - `count` integer, required
    - LawFirmAggregation
      - `data` LawFirmCountByRole[], required
        - `lawFirmId` integer, required
        - `lawFirmName` string, required
        - `rolesAndCounts` CountsPerRole[], required
          - `role` string, required
          - `count` integer, required

## Other responses

- `401`: Invalid or expired token
- `404`: Not found
- `422`: Error - 422

## Changes

- **2026-07-13** `8485408d6fea`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/lexmachina/apis/lex-machina-api/changes/analyze-district-cases/from-alert/:alert_id/get.md)

---

[API](https://skmtc.dev/lexmachina/apis/lex-machina-api.md) - [All operations](https://skmtc.dev/lexmachina/apis/lex-machina-api/llms.txt) - [OpenAPI document](https://skmtc.dev/lexmachina/apis/lex-machina-api/revisions/9ebaec5d3551?raw)
