Apple TV / Infuse
HTTP routes and behavior for apple tv / infuse.
GET /api/apple-tvs # adult caller's paired/granted TVs + helper supported flag; non-admins get id/name onlyPOST /api/apple-tvs/discover # admin { address? }; local-network or direct-address discovery, with explicit search scopePOST /api/apple-tvs/pairings # admin { name, address, identifier }; starts five-minute PIN ceremony -> id/device/expires_atPOST /api/apple-tvs/pairings/{id}/complete # same admin session { pin }; encrypts credentials, returns safe device fieldsDELETE /api/apple-tvs/pairings/{id} # same admin session; cancel pending pairingPATCH /api/apple-tvs/{id} # admin { name, address }; updates address/name and invalidates in-flight actionsDELETE /api/apple-tvs/{id} # admin; forget pairing and cascade TV grantsGET /api/apple-tvs/{id}/grants # admin; { user_ids }PUT /api/apple-tvs/{id}/grants # admin { user_ids }; replace explicit adult grants (admins always have access)POST /api/apple-tvs/{id}/check # admin; verify authenticated connection and Infuse installation, no launchPOST /api/apple-tvs/{id}/open # adult with TV grant/admin { media_type: movie|tv, tmdb_id }; live title access required # -> { state: sent, confirmation_id, confirmation_expires_at }; no autoplayPOST /api/apple-tvs/{id}/confirm-open # same caller session { confirmation_id }; explicit one-use Select, expires after 30 seconds # all routes no-store; kids denied; fixed safe error/code envelope; no raw URLs, credentials or PIN responses