---
title: "Opex Seen"
method: POST
path: "/api/print/agent/opex-seen"
tags: ["print-agent"]
---

# Opex Seen

`POST /api/print/agent/opex-seen`

## Request

- Base URL: `https://api.pigeonly.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.pigeonly.com/api/print/agent/opex-seen`
- Auth: none declared

Store the files the local OPEX watcher on `station` reports, once each (`opex_scan_seen`).

WHY THIS ROUTE. The office road (agent 1.67, an ask every minute or more) takes minutes to show a file; the local
watcher on the scanner PC sees it within seconds and posts it here. Rule and reason: the 2026-11-10 ruling
(docs/01_decisions/rulings/2026-11-10-a-roost-agent-on-each-opex-pc-is-the-fast-road.md, owner's order of
2026-11-09, "I thought you installed an agent on every one of them").

WHAT IT WRITES. Only `opex_scan_seen`, through `opex_scan_watch.store_listing`, the same once-per-file store the
office road uses (dedupe key station + path + written_at). It writes no change to any scanner file, profile or
setting; a file it cannot read the time of is counted as skipped, never guessed.

THE TOKEN IS BOUND TO ITS STATION. The token's print agent row is named for the PC (`Scanner02`, `OpexScanner`), and
a token posts only for that station: any other name is refused 403 before anything is written (`_bound_to_its_station`).
Decision: lane scanner-agents-and-score, 2026-11-16, closing OPEX-LOCAL-2 under the owner's 2026-11-11 delegation to
the lead. Until a PC has its own row the watcher cannot post; a `Transform` PC needs its own row named `Transform`.
The event records `source=local_watch` and the station, which is now the token's own.

The clock is Roost's (`seen_at`), so the delay the report measures is seen_at minus the scanner's own write time.

## Headers

- `authorization` string, nullable

## Request body

- OpexSeenBody: A batch of new scanner files from the local watcher on one OPEX PC (ruling 2026-11-10, "a Roost agent on each OPEX PC"). At most 200 per post; the watcher splits a larger batch and posts again. From watch 1.1 an empty batch may carry `beat` (the watcher's own state); a 1.0 watcher never sends one.
  - `station` 'Transform' | 'OpexScanner' | 'Scanner02', required
  - `files` OpexSeenFile[]
    - `path` string, required
    - `written_utc` string, required
    - `length` integer, required
  - `beat` OpexWatchBeat, nullable: The local watcher's own state, sent every 10 minutes from watch 1.1 (rule SCN-5; owner 2026-11-15, "Did you get the agent on the both scanning computers so that we can now have visibility into problems").
    - `watch_version` string, required
    - `started_utc` string, nullable
    - `scan_root_present` boolean, required
    - `batch_root_state` 'readable' | 'refused' | 'absent' | 'not_watched' | 'not_listed_yet', required
    - `batch_root_error` string, nullable
    - `queued` integer, required

## Response `200`

Successful Response

- object

## Other responses

- `422`: Validation Error

## Changes

- **2026-11-16** `f51f34f6c85c`: 1 info
  - added the new optional request property `beat`
- **2026-11-10** `a1043432c1c7`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/pigeonly/apis/roost-v2-pigeonly-company-os/changes/api/print/agent/opex-seen/post.md)

---

[API](https://skmtc.dev/pigeonly/apis/roost-v2-pigeonly-company-os.md) - [All operations](https://skmtc.dev/pigeonly/apis/roost-v2-pigeonly-company-os/llms.txt) - [OpenAPI document](https://skmtc.dev/pigeonly/apis/roost-v2-pigeonly-company-os/revisions/14571c4b7007?raw)
