Skip to content

Checking an instance

Terminal window
t4 doctor # read-only probe of the configured environment
t4 doctor --env prod

Reports the T4 version, token expiry, and whether each path responds, including whether the fields the tool extracts source from are still present, since a change to them between releases would otherwise show up as a silently empty pull rather than an error.

Run this first against any instance you have not used before. T4’s REST surface varies by version and deployment, so probing beats assuming.

It probes in two passes, because the API has two shapes of path:

  • Collections, named outright: pageLayout, navigation, contenttype, channel, list, sitestructure.
  • Paths that take an id: layout/{id}/{lang}, layout/contenttype/{id}/{lang}, hierarchy/{id}/{lang} with its /subsections and /contents, and media/{id}/{lang}. The ids come from the collections just fetched, so this is a handful of requests rather than a crawl.

The second pass matters more than its size suggests: content layouts, the section tree and media text are most of what t4 pull and t4 sections spend their requests on, and none of it is reachable by name.

Where there is nothing to ask about (an instance with no content types, or no media tag in the layouts read) the path is reported as skipped rather than failing. An empty instance is not a broken endpoint.

From a clone of the repository:

Terminal window
python3 docs/check_api.py # needs the network; not a test
python3 docs/check_api.py --all

This checks every path this tool calls against what T4 publishes, and reports which of the rest a development tool might plausibly want: version for history older than the last pull, lock so a push need not hope nobody is editing, preview for the one thing that renders T4 tags properly, workflow for the approval a push bypasses today.

T4 publishes two documents and neither is complete on its own.

What it is Caveat
/new/openapi.json A Swagger collection: exact paths and methods Curated: 15 groups, 118 paths. No T4 version stated
the older reference The full surface, about 100 groups Generated from 8.3.16, no methods, and it flattens a path’s punctuation away

So the script reads both. Of the nineteen paths this tool calls, thirteen are in the specification and four more only in the older reference. channel and sitestructure are absent from the specification entirely, as are hierarchy/{id}/{language}/subsections and /contents.

Two are documented but not for the method used, and they are not equally well understood:

  • GET /list/{id}: the specification lists DELETE only. The GET is what returns the lists, and t4 doctor exercises it on every run against a real instance, so this is a gap in the documentation.
  • PUT /media/{id}/{language}: listed as GET only, and this one is untested. It is the path a media push would use, and no media push has been run. It may work; nothing here shows that it does.

An undocumented behaviour can be withdrawn without a release note, so treat both as worth re-checking after a T4 upgrade, and the second as unproven until a media file has actually been pushed.

The rest of the surface is unused, mostly deliberately: apikey, clusterconfig, ldapcontext, paymentgateway are administration that something running on a laptop has no business calling. The script exists so the choice is visible rather than merely unmade, and so a path this tool depends on quietly disappearing gets noticed.

Neither document says what a deployment routes, and neither is labelled 8.4.x, which is what this tool is verified against. An absence here proves nothing. t4 doctor is the stronger signal, because it asks a server.

An independent, unofficial tool. Not produced, endorsed or supported by TERMINALFOUR Solutions Ltd, and not TERMINALFOUR software. “T4” and “TERMINALFOUR” are their trademarks, used here only to identify the software this works with. Copyright © 2026 Small Robot Corp. Source available under the PolyForm Shield License 1.0.0.