Skip to main content

Scope

This section documents public-safe implementation details for team and league data propagation across repositories and backend consumers.

Team and league data model overview

Core runtime objects:
  • Team metadata, branding, and team-level role relationships
  • League metadata, colors, and logos
  • Team-to-league linking and leaderboard association fields

Canonical source of truth

  • Leagues/team branding source lives in the leagues repository.
  • Backend canonical team provisioning runs through sync services and admin sync routes.
  • API consumers should treat d-sports-api endpoints as runtime truth.

Route surface

  • Public reads: /api/teams, /api/teams?slug=, /api/teams/{id}, /api/teams/search, /api/teams/{id}/roster, /api/teams/{id}/head-to-head?opponentId=, /api/teams/{id}/achievements, /api/leagues, /api/leagues/{leagueId}/standings, /api/config/sports
  • Authenticated membership: /api/user/teams, /api/teams/{id}/join, /api/teams/{id}/follow
  • HQ bookmarks: GET/POST /api/me/starred-teams, PUT/DELETE /api/me/starred-teams/{teamId}
  • Admin sync triggers: /api/admin/teams/sync, /api/admin/leagues/sync
  • Webhook sync trigger: /api/webhooks/leagues-sync
Search, single-team fetch, join, roster, head-to-head, user-teams, starred teams, leagues, standings, and the sports catalog are in the generated OpenAPI.

Deep dives