---
title: "Port Counterfactual Impact"
method: GET
path: "/api/counterfactual/port/{switch_name}/{port_name}"
tags: ["Counterfactual"]
---

# Port Counterfactual Impact

`GET /api/counterfactual/port/{switch_name}/{port_name}`

## Request

- Base URL: `https://api.fiber.ac` (the document declares no server; this is the origin it was published from)
- URL: `https://api.fiber.ac/api/counterfactual/port/{switch_name}/{port_name}`
- Auth: none declared

'If this port had been healthy' — computes GPU-hours and $ that would have been avoided over the past N hours, based on historical critical alert segments × current affected GPUs × (checkpoint rollback + recovery overhead).

## Path parameters

- `switch_name` string, required
- `port_name` string, required

## Query parameters

- `hours` integer
- `checkpoint_interval_min` number
- `recovery_overhead_min` number

## Response `200`

Incident segments with avoided GPU-hours and USD per segment, plus totals

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/fiber-ac/apis/fiber-api.md) · [All operations](https://skmtc.dev/fiber-ac/apis/fiber-api/llms.txt) · [OpenAPI document](https://skmtc.dev/fiber-ac/apis/fiber-api/revisions/58267250d793?raw)
