Geliştiriciler
SOTF Mods API for developers
- API başvurusu Şemalar ve örneklerle tüm v2 uç noktaları, etkileşimli.
- OpenAPI 3.1 İstemci üretmek için makine tarafından okunabilir belirtim.
- Eski API Hâlâ hizmette; dondurulmuş rotalar 31 Aralık 2027 tarihinde kapanacak.
Herkese açık okuma uç noktaları
Anonim, önbelleğe alınabilir ve CORS destekli. Başvuru her birinin parametrelerini, yanıtlarını ve hatalarını belgeler.
buildViewer
| Yöntem | Yol | Ne yapar |
|---|---|---|
| GET | /api/v2/builds/:id/preview | Top-down SVG preview of a build (latest version) |
| GET | /api/v2/builds/:id/geometry | Packed geometry of a build for the 3D viewer |
bundles
| Yöntem | Yol | Ne yapar |
|---|---|---|
| GET | /api/v2/mods/:id/bundles | Official bundles of a mod that are ready to download |
| GET | /api/v2/bundles/:id/download | Download the bundle zip (302 to R2) |
catalog
| Yöntem | Yol | Ne yapar |
|---|---|---|
| GET | /api/v2/mods | Explore mods, libraries and builds |
| GET | /api/v2/mods/:id | Mod detail by id |
| GET | /api/v2/mods/by-slug/:user/:slug | Mod detail by user handle and slug (exact) |
| GET | /api/v2/mods/by-manifest/:manifestId | Mod detail by manifest id (case-sensitive) |
| GET | /api/v2/mods/:id/dependencies | Resolved dependencies (required, optional, conflicts) |
| GET | /api/v2/mods/:id/dependents | Published mods that require this one ("Required by") |
| GET | /api/v2/mods/:id/related | Related mods (same category or tags + text similarity) |
| GET | /api/v2/categories | Categories with i18n names and counts |
| GET | /api/v2/tags | Curated tags with i18n names and counts |
| GET | /api/v2/creators | Creators directory with stats and tier |
| GET | /api/v2/users/:handle | Public profile |
| GET | /api/v2/users/:handle/mods | Published mods and libraries of a user |
| GET | /api/v2/users/:handle/builds | Published builds of a user |
| GET | /api/v2/users/:handle/reviews | Visible reviews written by a user |
| GET | /api/v2/users/:handle/activity | 12-month contribution heatmap (respects privacy) |
comments
| Yöntem | Yol | Ne yapar |
|---|---|---|
| GET | /api/v2/mods/:id/comments | Comments of a mod (Top = Wilson on positive reactions, or New) |
| GET | /api/v2/comments/:id | Permalink with the whole thread |
compat
| Yöntem | Yol | Ne yapar |
|---|---|---|
| GET | /api/v2/mods/:id/compat | Compatibility of a mod per version and game build |
| GET | /api/v2/ecosystem | RedLoader / RedManager status per game build |
| GET | /api/v2/game-builds | Registered game builds |
| GET | /api/v2/patch-radar | Patch Radar for a game build (top 50 by downloads in 30 days) |
| GET | /api/v2/compat/uptime | Uptime series of the platform components (Patch Radar) |
discovery
| Yöntem | Yol | Ne yapar |
|---|---|---|
| GET | /api/v2/scout/status | Whether Scout (AI mod finder) is available |
| GET | /api/v2/mods/:id/recommendations | Players also downloaded, and similar mods |
downloads
| Yöntem | Yol | Ne yapar |
|---|---|---|
| GET | /api/v2/versions/:id/download | Download a version (302 to R2) |
events
| Yöntem | Yol | Ne yapar |
|---|---|---|
| GET | /api/v2/mods/:id/live/stream | Live counters of a mod over server-sent events |
gamification
| Yöntem | Yol | Ne yapar |
|---|---|---|
| GET | /api/v2/badges | Badge catalog with unlock share, ranks and tiers |
| GET | /api/v2/awards/current | Mod of the Week and current staff picks |
| GET | /api/v2/users/:handle/badges | Badges of a user (field notebook) |
kits
| Yöntem | Yol | Ne yapar |
|---|---|---|
| GET | /api/v2/kits | Public kits |
| GET | /api/v2/kits/:id | Kit detail (unlisted only by link, private only for the owner) |
| GET | /api/v2/kits/by-slug/:user/:slug | Kit detail by owner handle and slug |
| GET | /api/v2/kits/by-code/:code | Kit by share code (`KIT-XXXX-XX` or the 6-character short code) |
| GET | /api/v2/users/:handle/kits | Public kits of a user (respects privacy) |
| GET | /api/v2/mods/:id/kits | Public kits that contain a mod (most followed first) |
kitSocial
| Yöntem | Yol | Ne yapar |
|---|---|---|
| GET | /api/v2/kits/:id/live/stream | Live follower and comment counts of a kit over server-sent events |
| GET | /api/v2/kits/:id/comments | Comments of a kit (newest first, replies embedded) |
modKnowledge
| Yöntem | Yol | Ne yapar |
|---|---|---|
| GET | /api/v2/mods/:id/knowledge | Known issues, author FAQ and co-authors of a mod |
| GET | /api/v2/mods/:id/diff | Difference between two versions of a mod (files, manifest, changelog range) |
| GET | /api/v2/users/:handle/coauthored | Published mods a user co-authors |
oauth
| Yöntem | Yol | Ne yapar |
|---|---|---|
| GET | /api/v2/auth/providers | OAuth providers available on this server |
| GET | /api/v2/auth/oauth/:provider/start | Start an OAuth sign-in or link |
| GET | /api/v2/auth/oauth/:provider/callback | OAuth callback |
requests
| Yöntem | Yol | Ne yapar |
|---|---|---|
| GET | /api/v2/requests | Mod requests (top voted or newest) |
| GET | /api/v2/requests/:id | A mod request |
| GET | /api/v2/requests/:id/comments | Comments of a request, oldest first |
reviews
| Yöntem | Yol | Ne yapar |
|---|---|---|
| GET | /api/v2/mods/:id/reviews | Reviews of a mod |
| GET | /api/v2/mods/:id/reviews/summary | Histogram, mean and Bayesian mean of a mod |
search
| Yöntem | Yol | Ne yapar |
|---|---|---|
| GET | /api/v2/search | Full-text + fuzzy search across mods, builds, kits, users and pages |
| GET | /api/v2/search/index | Compact Cmd+K index for a locale |
seo
| Yöntem | Yol | Ne yapar |
|---|---|---|
| GET | /api/v2/resolve | Resolve a public path (history, case, owner changes, tombstones) |
stats
| Yöntem | Yol | Ne yapar |
|---|---|---|
| GET | /api/v2/site/stats | Site-wide figures |
| GET | /api/v2/live/pulse | Live readout of the landing |
| GET | /api/v2/mods/:id/live | Live counters of a mod |
| GET | /api/v2/mods/:id/badge/:kind | SVG badge of a mod (downloads, version, rating, followers, compat) |
| GET | /api/v2/mods/:id/stats/public | Public download series of a mod |
translations
| Yöntem | Yol | Ne yapar |
|---|---|---|
| GET | /api/v2/mods/:id/translation | Translated short description of a mod |
versions
| Yöntem | Yol | Ne yapar |
|---|---|---|
| GET | /api/v2/mods/:id/versions | Versions of a mod (semver order) |
| GET | /api/v2/mods/:id/versions/:version | One version by id, version string or `latest` |
Hata kodları
Bir hatanın code alanı bunlardan biridir. Her sorunun type URI’si buradaki satırını gösterir.
| Kod | Durum | Anlamı |
|---|---|---|
| VALIDATION_FAILED | 422 | The request is not valid |
| UNAUTHENTICATED | 401 | Sign in required |
| INVALID_CREDENTIALS | 401 | Wrong email, handle or password |
| FORBIDDEN | 403 | You cannot do this |
| EMAIL_NOT_VERIFIED | 403 | Verify your email first |
| TURNSTILE_REQUIRED | 403 | Complete the human check |
| REAUTH_REQUIRED | 403 | Sign in again to continue |
| SUSPENDED | 403 | Your account is suspended |
| NOT_FOUND | 404 | Not found |
| CONFLICT | 409 | This conflicts with the current state |
| GONE | 410 | This is gone |
| PAYLOAD_TOO_LARGE | 413 | The upload is too large |
| UNSUPPORTED_MEDIA_TYPE | 415 | Unsupported content type |
| RATE_LIMITED | 429 | Too many requests |
| INTERNAL | 500 | Something went wrong |
| UNAVAILABLE | 503 | Temporarily unavailable |
Hız sınırları
Bir sınırın üzerinde API, Retry-After başlığıyla 429 yanıtı verir. Yanıtları önbelleğe al ve ETag’lere uy; nadiren yaklaşırsın.
| Kapsam | Sınır | Notlar |
|---|---|---|
| API v2 okumaları | 300 / 1 minute · IP başına | — |
| Eski API okumaları | 600 / 1 minute · IP başına | — |
| İndirmeler | 60 / 1 minute · IP başına | never 429: above the limit the download redirects but does not count |
Eski API ve kullanımdan kaldırmalar
Sitenin ilk sürümünün API’si, RedManager, UpdatesChecker ve oyun içi modlar çalışmaya devam etsin diye api.sotf-mods.com/api/* ve sotf-mods.com/api/* adreslerinde yanıt vermeye devam ediyor. Yeni entegrasyonlar v2 kullanmalı.
Destekleniyor (bayt düzeyinde uyumlu)
| Yöntem | Yol | Ne yapar |
|---|---|---|
| GET | /api/mods | List mods (legacy, byte-compatible; RedManager and UpdatesChecker) |
| GET | /api/mods/:mod_id | Mod by manifest id (legacy, byte-compatible) |
| GET | /api/mods/:mod_id/check | Update check with node-semver `gt` (legacy, byte-compatible) |
Dondurulmuş ve kullanımdan kalkıyor
Bu rotalar 31 Aralık 2027 tarihine kadar yanıt verir, sonra kapatılır. Yanıtlarında şu başlıklar bulunur:
Deprecation: true
Sunset: Fri, 31 Dec 2027 00:00:00 GMT
Link: <https://sotf-mods.com/developers>; rel="deprecation" | Yöntem | Yol | Ne yapar |
|---|---|---|
| GET | /api/mods/slug/:userSlug/:mod_slug | Mod by user and slug (legacy, frozen) |
| GET | /api/mods/find | Manifest id by user and slug (legacy, frozen) |
| GET | /api/mods/featured | 12 featured mods (legacy, frozen) |
| GET | /api/builds/featured | 4 featured builds (legacy, frozen) |
| GET | /api/stats | Site stats (legacy, frozen; downloads include orphan rows) |
| GET | /api/stats/builds | Build stats (legacy, frozen) |
| GET | /api/categories | Categories by type (legacy, frozen) |
| GET | /api/users/:userSlug | User (legacy, frozen) |
| GET | /api/users/:userSlug/stats | User stats (legacy, frozen) |
| GET | /api/comments | Comments of a mod by numeric id (legacy, frozen; hidden ones excluded) |
| GET | /api/mods/:mod_id/download-stats | Daily downloads (legacy, frozen; unknown mod → 200 `{status:false}`) |
| GET | /api/mods/:mod_id/download/:version | Download alias (302 to R2; `?ip=&agent=` ignored) |
| GET | /api/mods/slug/:userSlug/:mod_slug/download/:version | Download alias by slug (302 to R2) |
Kapatıldı
Bu rotalardaki her yöntem şu gövdeyle 410 Gone yanıtı verir:
Kaldırılan yazma rotaları (yüklemeler, düzenlemeler, yorumlar, oylar) da aynı zarfla 410 döner: status false, error GONE. Bunun yerine belirteçle v2 API’sini kullanın.
{"status":false,"error":"GONE","message":"This endpoint was retired in sotf-mods v2. See https://sotf-mods.com/developers"} - ANY /api/auth/*
- ANY /api/favorites
- ANY /api/favorites/*
- GET /api/mods/:mod_id/favorite
- GET /api/mods/:mod_id/approve
- GET /api/mods/:mod_id/unapprove
- POST /api/mods/:mod_id/release
- PATCH /api/mods/:mod_id/details
- POST /api/files/presigned-url
- POST /api/mods/upload
- POST /api/mods/publish
- POST /api/builds/upload
- POST /api/builds/publish
- POST /api/users/avatar
- POST /api/comments
- ANY /api/kelvin-gpt/*
Eski davranıştan bilinçli farklar
-
approved=falseonly returnspendingmods whose checks passed -
approved=truereturnspublishedonly (archived, unlisted and removed are excluded) - Without
approved: published, pending with checks, archived and unlisted - The detail by mod_id returns everything except rejected and removed (404)
- The 19 mods with
type = nullcome out as "Mod" or "Library" (backfill B4) - Validation errors answer 422 with the envelope instead of 500
- Every sort has
idas tie-breaker (stable pagination) - Responses add Cache-Control, Deprecation (Tier 2) and X-Request-Id
- Downloads answer 302 to R2 instead of streaming the file