← back to AsSeenInMovies
asseeninmovies: GET /api — JSON index of every public API endpoint with one-line descriptions + public-data-only declaration + TMDB license note. Integrators don't have to read source to discover what's available.
ea5c081df8831725d044068db8425dcf859c2de8 · 2026-05-12 20:02:13 -0700 · SteveStudio2
Files touched
Diff
commit ea5c081df8831725d044068db8425dcf859c2de8
Author: SteveStudio2 <stevestudio2@SteveStacStudio.lan>
Date: Tue May 12 20:02:13 2026 -0700
asseeninmovies: GET /api — JSON index of every public API endpoint with one-line descriptions + public-data-only declaration + TMDB license note. Integrators don't have to read source to discover what's available.
---
server.js | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/server.js b/server.js
index f1a7a24..7fe8731 100644
--- a/server.js
+++ b/server.js
@@ -59,6 +59,26 @@ async function ensureSchema() {
app.use(express.static(path.join(__dirname, 'public'), { maxAge: '1h' }));
+// /api — JSON index of all public API endpoints. Useful for integrators
+// who want to know what's available without reading the source.
+app.get('/api', (_req, res) => {
+ res.json({
+ name: 'AsSeenInMovies API',
+ base: process.env.ASIM_PUBLIC_URL || 'https://asseeninmovies.com',
+ endpoints: {
+ 'GET /api/health': 'Liveness probe + cached counts (movies/people/spotted)',
+ 'GET /api/search?q=…': 'ILIKE search across movies + people (poster-having subset)',
+ 'GET /api/movie/:id': 'Single movie row by id (TMDB id, not slug)',
+ 'GET /api/person/:id': 'Single person row by id',
+ 'GET /api/spotted': 'Verified SPOTTED placements (limit ≤ 200, optional category=…)',
+ 'GET /api/spotted/stats': 'Aggregate counts (pending/live/rejected/submitted_7d/films/brands/categories)',
+ 'GET /api/ingest/status': 'Background-ingest queue depth (admin-ish; safe to expose)',
+ },
+ public_data_only: true,
+ license: 'Movie metadata via TMDB (not endorsed/certified). People + credits via TMDB + Wikidata CC0.',
+ });
+});
+
app.get('/api/health', async (_req, res) => {
try {
// Cheap liveness: SELECT 1 only. The count(*) counts come from the
← 4648ead asseeninmovies: ItemList JSON-LD on /movies + /people index
·
back to AsSeenInMovies
·
asseeninmovies: smoke — add /api discovery doc check (+2 ass a471a71 →