Public API
For developers
للمطوّرين
Every surface listed here is open, unauthenticated and CORS-enabled. Cache TTLs sit between 5 and 60 minutes. Questions: [email protected].
Registry
الفهرس
Start here, one JSON object listing every machine-readable endpoint with its description.
| Path | Description |
|---|---|
| /api/public | Index of every public endpoint. |
Entities
الكيانات
Lists and per-record JSON. Every response is UTF-8, 2-space-indented, CORS *.
| Path | Description |
|---|---|
| /api/public/athletes | Active national-team athletes. |
| /api/public/athletes/{slug} | Full athlete profile (bio, medals, highlights). |
| /api/public/events | All events, newest first. |
| /api/public/events/{id} | Full event detail. |
| /api/public/upcoming | Only future events (date >= today UTC). |
| /api/public/news | 50 latest articles, title + slug + date + cover. |
| /api/public/news/{slug} | Article body, EN + AR. |
| /api/public/clubs | All member clubs. |
| /api/public/clubs/{slug} | Single club with contact + sessions. |
| /api/public/committee | Active committee members. NO email or phone. |
| /api/public/committee/{id} | Single committee member by id. |
| /api/public/results | Last 200 tournament results. |
| /api/public/stats | Aggregate counts + weapon/gender/medal breakdown. |
| /api/public/latest | One-call widget feed: 5 events + 5 news + 10 results. |
| /api/public/disciplines | Foil/épée/sabre reference data. |
| /api/public/changelog | Sprint changelog as JSON (?limit=N). |
| /api/public/feeds.json | Catalog of every machine-readable surface. |
| /api/health | Uptime probe with bootAt, uptimeSeconds. |
Search
بحث
Cross-entity search and typeahead. NFD-normalised so Arabic + accented Latin (épée, élève) work without diacritics.
| Path | Description |
|---|---|
| /api/public/search?q={query}&limit={1-50} | Scored cross-entity search across athletes, news, events, clubs, committee. |
| /api/public/search/suggest?q={query} | Lightweight typeahead, max 8 title-only results. |
Feeds
خلاصات
Standard subscribable formats for news readers, calendars and spreadsheets.
| Path | Description |
|---|---|
| /news.rss.xml | News RSS 2.0 feed. |
| /news.atom.xml | News Atom 1.0 feed (per-entry xml:lang). |
| /changelog.rss.xml | Sprint changelog RSS feed. |
| /changelog.atom.xml | Sprint changelog Atom feed. |
| /events.ics | Events iCalendar (RFC 5545) for Apple/Google/Outlook. |
| /events/{id}.ics | Per-event iCalendar download. |
| /athletes.csv | Athletes CSV. |
| /events.csv | Events CSV. |
| /clubs.csv | Clubs CSV with medal scoring. |
| /results.csv | Results CSV. |
| /committee.csv | Committee CSV. |
| /coaches.csv | National-programme coaches CSV. |
| /clubs/{slug}/athletes.csv | Per-club roster CSV (active members of one club). |
| /clubs/{slug}/athletes.json | Per-club roster JSON sibling. |
Discovery
الاكتشاف
Machine-readable pointers for crawlers and search engines.
| Path | Description |
|---|---|
| /sitemap.xml | Sitemap index (pages, news, events, athletes). |
| /robots.txt | Crawler directives. |
| /.well-known/security.txt | RFC 9116 disclosure contact. |
| /opensearch.xml | OpenSearch 1.1 descriptor. |
| /humans.txt | Humans-readable about file. |
| /manifest.webmanifest | PWA manifest. |
| /api/openapi.json | OpenAPI 3.1 descriptor (importable into Postman). |
Example: fetch upcoming events
مثال: جلب الفعاليات القادمة
curl -s https://fencing.om/api/public/upcoming | jq .events
No API key is required. Please cache responses client-side according to Cache-Control. Bulk mirror rather than polling if you need higher throughput, and email first if you want a dedicated webhook.