---
title: "Analyze and summarize a plan run, saving the result. Generates/regenerates the summary."
method: POST
path: "/analysis/{workspace_id}/planRun/summary"
tags: ["Analysis"]
---

# Analyze and summarize a plan run, saving the result. Generates/regenerates the summary.

`POST /analysis/{workspace_id}/planRun/summary`

Analyze and summarize a plan run and save the result. Call getSavedPlanRunFailureAnalysis before this endpoint, to use the prior saved response, if available.

## Path parameters

- `workspace_id` string, required

## Query parameters

- `regenerate` boolean

## Request body

- PlanRunAnalysisRequest
  - `plan_run_id` string, required — The ID of the plan run to analyze
  - `save_summary` boolean — Whether to save the summary of the plan run analysis

## Response `200`

A summary of the analysis of the plan run

- PlanRunAnalysisResponse
  - `headline` string — The short summary of the plan run analysis; typically limited to one sentence
  - `summary` string — The summary of the plan run analysis
  - `empty_response_reason` 'performance_only' | 'failing_tests_deleted' | 'precondition_failed' — (optional) The reason the analysis response is empty (e.g. All were performance tests)

## Other responses

- `400` — Invalid or missing parameter
- `401` — User not authenticated
- `403` — User not authorized
- `default` — Unknown error

---

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