Developer / Referensi
List entities of a given kind with filters + pagination + opt-in facets
GET /v1/entities/{kind}
Isi referensi
List companion to `GET /v1/entities/{kind}/{id}`. Same envelope shape per row, plus pagination metadata and optional facet aggregates.
Filters apply against `entities.attributes` (jsonb) for kind-specific keys (status, type, release_date) and against the top-level `label_id` / `label_en` for full-text-ish search (`q` param).
Facets are opt-in via `?facets=...` (comma-separated). Each facet runs as a separate aggregate query — kept off the hot path to keep listing requests snappy. Allowed: `release_years`, `production_companies`, `status`, `type`.
Sort columns are whitelisted (top-level + a small set of `attributes.{key}` paths). Default sort is `label_id` asc, but date-like sorts default to desc — most-recent-first is what listing pages want.
Phase 1.0 cut: returns an empty `data` array until the entities backfill (TAYANG_MIGRATION_SPEC.md §7.6) and Sumber-side scraper port populate the catalog. Pagination metadata still returns (total = 0).
Deskripsi endpoint berasal dari spesifikasi dan masih berbahasa Inggris.
Parameter
| Parameter | Lokasi | Tipe | Aturan |
|---|---|---|---|
| kind | path | company | movie | cinema | person | production_company | athlete | club | league | federation | venue | event | sponsor | agent | content_asset | Wajib |
| status | query | string | Opsional |
| type | query | string | Opsional |
| year | query | integer | Opsional |
| cohort | query | string | Opsional |
| q | query | string | Opsional |
| sort | query | label_id | label_en | created_at | updated_at | attributes.release_date | attributes.runtime_minutes | attributes.screen_count | attributes.medal_count_olympic_gold | attributes.medal_count_olympic_silver | attributes.medal_count_olympic_bronze | attributes.medal_count_asian_games_gold | attributes.medal_count_asian_games_silver | attributes.medal_count_asian_games_bronze | attributes.medal_count_sea_games_gold | attributes.medal_count_sea_games_silver | attributes.medal_count_sea_games_bronze | attributes.medal_count_total | attributes.medal_count_gold_total | attributes.total_appearances | attributes.fangir_appearances | Opsional |
| order | query | asc | desc | Opsional |
| limit | query | integer | Opsional |
| offset | query | integer | Opsional |
| facets | query | string | Opsional |
Hak redistribusi mengikuti lisensi seri. Data tampilan saja tidak tersedia sebagai baris mentah.
Respons
| Kode | Keterangan |
|---|---|
| 200 | Paginated list of entity envelopes (+ optional facets) |
| 400 | Invalid request parameters |
| 401 | Missing or invalid API key |
| 429 | Quota exceeded; retry after the window resets |
Dibangkitkan dari openapi.yaml, spesifikasi yang sama dengan /v1/openapi.yaml.
Permintaan / contoh
curl -H "x-api-key: $SUMBER_KEY" \
"https://api.sumber.io/v1/entities/<kind>"