---
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}`

## 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

---

[API](https://skmtc.net/lexmachina/apis/lex-machina-api.md) · [All operations](https://skmtc.net/lexmachina/apis/lex-machina-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/lexmachina/lex-machina-api/revisions/5f519a7078fc/schema)
