On this page
TuneSera adds REST API routes that power its admin screens and front-end features. Most are private and need an administrator to be logged in; a few public read-only routes power the directory for visitors.
Standard WordPress routes#
Stations and their taxonomies are available through the core WordPress REST API:
/wp-json/wp/v2/tunesera_station
/wp-json/wp/v2/tunesera_country
/wp-json/wp/v2/tunesera_city
/wp-json/wp/v2/tunesera_genrePublic TuneSera routes#
Namespace: tunesera-internet-radio-directory/v1. These are read-only and need no login.
| Route | Purpose |
|---|---|
GET /stations | Directory listing. Accepts search, country, city, genre, language, sort, page and per_page. |
GET /stations/now-playing-titles | Current song titles for stations on screen. |
GET /stations/surprise | A random station for “surprise me” features. |
GET /stations/{id}/neighbors | Previous and next stations, used by the player. |
GET /home-country | Recent stations for a country, used by homepage sections. |
Admin routes#
These need a logged-in user with the right capability (usually manage_options) and a valid REST nonce. They back the TuneSera admin screens and may change between versions, so avoid relying on them in your own code.
/settings,/settings/action,/settings/directory-preview,/settings/shortcode-preview,/settings/stations,/settings/location-parents/overview,/setup/…/locations/…- Import routes for jobs, uploads and history
TuneSera Pro routes#
| Route | Purpose | Access |
|---|---|---|
tunesera-pro/v1/analytics/session, /analytics/event | Record listening sessions and events from visitors’ browsers | Public, signed and rate-limited |
tunesera-pro/v1/analytics/report, /analytics/clear | Analytics reports and clearing data | Administrators |
tunesera-pro/v1/featured-stations | Manage featured stations | Administrators |
Related articles#
Was this article helpful?