---
title: "Port RUL Prediction"
method: GET
path: "/api/ml/rul/{switch_name}/{port_name}"
tags: ["ML"]
---

# Port RUL Prediction

`GET /api/ml/rul/{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/ml/rul/{switch_name}/{port_name}`
- Auth: none declared

Return the LSTM-predicted remaining useful life (in hours) for a specific port. Uses the last 24 optical readings (2 min window) as input. Pass ?heatmap=true to also receive the W9 channel × timestep saliency heatmap (24 × 10).

## Path parameters

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

## Query parameters

- `heatmap` boolean

## Response `200`

Predicted RUL hours and input sample count (+ optional heatmap)

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