Survey Micropub media-endpoint extensions and client behavior #182
Labels
No labels
kind
bug
kind
enhancement
wayfinder
grilling
wayfinder
map
wayfinder
prototype
wayfinder
research
wayfinder
task
workflow
needs-info
workflow
needs-triage
workflow
ready-for-agent
workflow
ready-for-human
workflow
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
rosa/vernier#182
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Map: #181
Question
The Micropub media endpoint (
POST /media,crates/web/src/handlers/micropub.rs:88) should growq=sourcelisting and delete. Both are community extensions with loose specs, and we do not yet know which clients to target — that is part of the question, not an input to it.Survey:
q=sourceon the media endpoint,q=source&url=for a single item, delete of an uploaded file).action=delete+urlto the media endpoint? to the main endpoint?)? What scope do they expect to hold?q=sourceon a media endpoint?Resolve to: (a) a short list of clients worth targeting, (b) the exact request/response wire shapes to implement for listing and delete, (c) the scope enforcement expectation for media delete, with each fact traced to a primary source (spec text, client source code, or server implementation).
Resolution
Full findings:
docs/research/micropub-media-endpoint-extensions.mdon branchresearch/micropub-media-endpoint, every fact cited to spec text, wiki/issue-thread record, or source at a pinned commit.(a) Clients to target. Only two maintained open-source clients actually consume media-endpoint
q=source:?q=source&limit=1; needsitems[0].url, and ifitems[0].publishedexists it must parse and fall within the last 15 minutes (the code enforces 900 s despite its own "5 minutes" comment).?q=source; renders everyitems[].urland ignores all other fields (the wiki's claim that it paginates with limit/offset is contradicted by its source).IndiePass/Indigenous Android (archived 2026-01), Indigenous iOS (archived 2023), and Micropublish are upload-only against the media endpoint. No open-source client anywhere issues a media delete or the
url=single lookup — those exist purely as server precedent (media.aaronpk.com, micro.blog, WordPress plugin, Indiekit) and are implemented for parity, not for an observed client.(b) Wire shapes.
GET <media-endpoint>?q=source[&limit=N][&offset=N]→200with{"items": [{"url": ..., "published": "<RFC3339>", "mime_type": ...}]}, newest first, default limit 10 (aaronpk/WordPress/benjifs precedent).urlis the only consensus-required item property;publishedandmime_typeare the interop-relevant extras (Indiekit'scontent-typefield andafter/beforecursor are outliers). Missing or unknownq→ 400.GET <media-endpoint>?q=source&url=<file-url>→ the bare item object, not wrapped initems; unknown URL → 400invalid_request, not 404 (the only two implementations, WordPress and Indiekit, agree on both points).POST action=delete&url=<file-url>to the media endpoint itself (extensions issue #30 resolution; all four servers) →200; response body is unstandardized (micro.blog returns{}, Indiekit a{"success":"delete",...}object). Missingurl→ 400.(c) Scope for media delete. Require both
deleteandmedia, answering 403insufficient_scopeotherwise — the 2020 Micropub Pop-Up consensus, the wiki text, and aaronpk's production enforcement. Precedent is split (micro.blog enforces nothing; Indiekit onlymedia; WordPress maps to capabilities), but since no client sends media deletes today the strict reading costs no interop. For uploads, mirror the commoncreate-implies-medialeniency: Sparkles and Indigenous iOS request onlycreate, and Micropublish's login form cannot requestmediaat all.Resolved: target Quill and Sparkles; q=source returns {"items":[{url, published, mime_type}]} newest-first (bare object for &url= lookup, 400 on unknown); delete is form-encoded POST action=delete&url= to the media endpoint requiring delete+media scopes. Details in the comment above and docs/research/micropub-media-endpoint-extensions.md on branch research/micropub-media-endpoint.