2018-09-18 16:09:48 +02:00
openapi : 3.0 .0
info :
title : AzuraCast
description : 'AzuraCast is a standalone, turnkey web radio management tool. Radio stations hosted by AzuraCast expose a public API for viewing now playing data, making requests and more.'
license :
name : 'Apache 2.0'
url : 'http://www.apache.org/licenses/LICENSE-2.0.html'
2019-03-25 13:47:07 +01:00
version : 0.9 .4
2018-09-18 16:09:48 +02:00
servers :
-
url : 'https://demo.azuracast.com/api'
2018-12-24 09:47:45 +01:00
description : 'AzuraCast Public Demo Server'
2018-09-18 16:09:48 +02:00
paths :
2019-01-29 23:32:32 +01:00
/admin/custom_fields :
get :
tags :
- 'Administration : Custom Fields'
description : 'List all current custom fields in the system.'
responses :
'200' :
description : Success
content :
application/json :
schema :
type : array
items :
$ref : '#/components/schemas/CustomField'
'403' :
description : 'Access denied'
security :
-
api_key : [ ]
post :
tags :
- 'Administration : Custom Fields'
description : 'Create a new custom field.'
requestBody :
content :
application/json :
schema :
$ref : '#/components/schemas/CustomField'
responses :
'200' :
description : Success
content :
application/json :
schema :
$ref : '#/components/schemas/CustomField'
'403' :
description : 'Access denied'
security :
-
api_key : [ ]
'/admin/custom_field/{id}' :
get :
tags :
- 'Administration : Custom Fields'
description : 'Retrieve details for a single custom field.'
parameters :
-
name : id
in : path
description : ID
required : true
schema :
type : integer
format : int64
responses :
'200' :
description : Success
content :
application/json :
schema :
$ref : '#/components/schemas/CustomField'
'403' :
description : 'Access denied'
security :
-
api_key : [ ]
put :
tags :
- 'Administration : Custom Fields'
description : 'Update details of a single custom field.'
parameters :
-
name : id
in : path
description : ID
required : true
schema :
type : integer
format : int64
requestBody :
content :
application/json :
schema :
$ref : '#/components/schemas/CustomField'
responses :
'200' :
description : Success
content :
application/json :
schema :
$ref : '#/components/schemas/Api_Status'
'403' :
description : 'Access denied'
security :
-
api_key : [ ]
delete :
tags :
- 'Administration : Custom Fields'
description : 'Delete a single custom field.'
parameters :
-
name : id
in : path
description : ID
required : true
schema :
type : integer
format : int64
responses :
'200' :
description : Success
content :
application/json :
schema :
$ref : '#/components/schemas/Api_Status'
'403' :
description : 'Access denied'
security :
-
api_key : [ ]
2019-01-05 13:02:49 +01:00
/admin/permissions :
get :
tags :
- 'Administration : Roles'
description : 'Return a list of all available permissions.'
operationId : 'App\Controller\Api\Admin\PermissionsController::__invoke'
responses :
'200' :
description : Success
'403' :
description : 'Access denied'
security :
-
api_key : [ ]
/admin/roles :
get :
tags :
- 'Administration : Roles'
description : 'List all current roles in the system.'
2019-01-06 09:57:09 +01:00
operationId : 'App\Controller\Api\Admin\RolesController::_denormalizeToRecord'
2019-01-05 13:02:49 +01:00
responses :
'200' :
description : Success
content :
application/json :
schema :
type : array
items :
$ref : '#/components/schemas/Role'
'403' :
description : 'Access denied'
security :
-
api_key : [ ]
post :
tags :
- 'Administration : Roles'
description : 'Create a new role.'
2019-01-06 09:57:09 +01:00
operationId : 'App\Controller\Api\Admin\RolesController::_denormalizeToRecord'
2019-01-05 13:02:49 +01:00
requestBody :
content :
application/json :
schema :
$ref : '#/components/schemas/Role'
responses :
'200' :
description : Success
content :
application/json :
schema :
$ref : '#/components/schemas/Role'
'403' :
description : 'Access denied'
security :
-
api_key : [ ]
'/admin/role/{id}' :
get :
tags :
- 'Administration : Roles'
description : 'Retrieve details for a single current role.'
2019-01-06 09:57:09 +01:00
operationId : 'App\Controller\Api\Admin\RolesController::_denormalizeToRecord'
2019-01-05 13:02:49 +01:00
parameters :
-
name : id
in : path
description : 'Role ID'
required : true
schema :
type : integer
format : int64
responses :
'200' :
description : Success
content :
application/json :
schema :
$ref : '#/components/schemas/Role'
'403' :
description : 'Access denied'
security :
-
api_key : [ ]
put :
tags :
- 'Administration : Roles'
description : 'Update details of a single role.'
2019-01-06 09:57:09 +01:00
operationId : 'App\Controller\Api\Admin\RolesController::_denormalizeToRecord'
2019-01-05 13:02:49 +01:00
parameters :
-
name : id
in : path
description : 'Role ID'
required : true
schema :
type : integer
format : int64
requestBody :
content :
application/json :
schema :
$ref : '#/components/schemas/Role'
responses :
'200' :
description : Success
content :
application/json :
schema :
$ref : '#/components/schemas/Api_Status'
'403' :
description : 'Access denied'
security :
-
api_key : [ ]
delete :
tags :
- 'Administration : Roles'
description : 'Delete a single role.'
2019-01-06 09:57:09 +01:00
operationId : 'App\Controller\Api\Admin\RolesController::_denormalizeToRecord'
2019-01-05 13:02:49 +01:00
parameters :
-
name : id
in : path
description : 'Role ID'
required : true
schema :
type : integer
format : int64
responses :
'200' :
description : Success
content :
application/json :
schema :
$ref : '#/components/schemas/Api_Status'
'403' :
description : 'Access denied'
security :
-
api_key : [ ]
2019-01-06 09:57:09 +01:00
/admin/settings :
get :
tags :
- 'Administration : Settings'
description : 'List the current values of all editable system settings.'
operationId : 'App\Controller\Api\Admin\SettingsController::listAction'
responses :
'200' :
description : Success
content :
application/json :
schema :
$ref : '#/components/schemas/Api_Admin_Settings'
'403' :
description : 'Access denied'
security :
-
api_key : [ ]
put :
tags :
- 'Administration : Settings'
description : 'Update settings to modify any settings provided.'
operationId : 'App\Controller\Api\Admin\SettingsController::updateAction'
requestBody :
content :
application/json :
schema :
$ref : '#/components/schemas/Api_Admin_Settings'
responses :
'200' :
description : Success
content :
application/json :
schema :
$ref : '#/components/schemas/Api_Status'
'403' :
description : 'Access denied'
security :
-
api_key : [ ]
2019-01-03 11:59:44 +01:00
/admin/users :
2018-09-18 16:09:48 +02:00
get :
tags :
2019-01-03 11:59:44 +01:00
- 'Administration : Users'
description : 'List all current users in the system.'
2018-09-18 16:09:48 +02:00
responses :
'200' :
description : Success
2019-01-03 11:59:44 +01:00
content :
application/json :
schema :
type : array
items :
$ref : '#/components/schemas/User'
'403' :
description : 'Access denied'
security :
-
2019-01-03 12:35:38 +01:00
api_key : [ ]
2019-01-03 11:59:44 +01:00
post :
2018-09-18 16:09:48 +02:00
tags :
2019-01-03 11:59:44 +01:00
- 'Administration : Users'
description : 'Create a new user.'
requestBody :
content :
application/json :
schema :
$ref : '#/components/schemas/User'
2018-09-18 16:09:48 +02:00
responses :
'200' :
description : Success
2019-01-03 11:59:44 +01:00
content :
application/json :
schema :
$ref : '#/components/schemas/User'
'403' :
description : 'Access denied'
security :
-
2019-01-03 12:35:38 +01:00
api_key : [ ]
2019-01-03 11:59:44 +01:00
'/admin/user/{id}' :
2018-09-18 16:09:48 +02:00
get :
tags :
2019-01-03 11:59:44 +01:00
- 'Administration : Users'
description : 'Retrieve details for a single current user.'
2018-09-18 16:09:48 +02:00
parameters :
-
2019-01-03 11:59:44 +01:00
name : id
in : path
description : 'User ID'
required : true
schema :
type : integer
format : int64
2018-09-18 16:09:48 +02:00
responses :
'200' :
description : Success
2019-01-03 11:59:44 +01:00
content :
application/json :
schema :
$ref : '#/components/schemas/User'
2018-09-18 16:09:48 +02:00
'403' :
description : 'Access denied'
security :
-
2019-01-03 12:35:38 +01:00
api_key : [ ]
2019-01-03 11:59:44 +01:00
put :
tags :
- 'Administration : Users'
description : 'Update details of a single user.'
parameters :
-
name : id
in : path
description : 'User ID'
required : true
schema :
type : integer
format : int64
requestBody :
content :
application/json :
schema :
$ref : '#/components/schemas/User'
responses :
'200' :
description : Success
content :
application/json :
schema :
$ref : '#/components/schemas/Api_Status'
'403' :
description : 'Access denied'
security :
-
2019-01-03 12:35:38 +01:00
api_key : [ ]
2019-01-03 11:59:44 +01:00
delete :
tags :
- 'Administration : Users'
description : 'Delete a single user.'
operationId : 'App\Controller\Api\Admin\UsersController::deleteAction'
parameters :
-
name : id
in : path
description : 'User ID'
required : true
schema :
type : integer
format : int64
responses :
'200' :
description : Success
content :
application/json :
schema :
$ref : '#/components/schemas/Api_Status'
'403' :
description : 'Access denied'
security :
-
2019-01-03 12:35:38 +01:00
api_key : [ ]
2019-01-03 11:59:44 +01:00
/status :
2018-09-18 16:09:48 +02:00
get :
tags :
2019-01-03 11:59:44 +01:00
- Miscellaneous
description : 'Returns an affirmative response if the API is active.'
operationId : 'App\Controller\Api\IndexController::statusAction'
2018-12-22 18:27:41 +01:00
parameters : [ ]
2018-09-18 16:09:48 +02:00
responses :
'200' :
description : Success
2019-01-03 11:59:44 +01:00
/time :
2018-09-18 16:09:48 +02:00
get :
tags :
2019-01-03 11:59:44 +01:00
- Miscellaneous
description : 'Returns the time (with formatting) in GMT and the user' 's local time zone, if logged in.'
operationId : 'App\Controller\Api\IndexController::timeAction'
parameters : [ ]
2018-09-18 16:09:48 +02:00
responses :
'200' :
description : Success
2019-01-03 11:59:44 +01:00
/nowplaying :
2018-09-18 16:09:48 +02:00
get :
tags :
2019-01-03 11:59:44 +01:00
- 'Now Playing'
description : 'Returns a full summary of all stations' ' current state.'
operationId : 'App\Controller\Api\NowplayingController::__invoke'
parameters : [ ]
2018-09-18 16:09:48 +02:00
responses :
'200' :
description : Success
2019-01-03 11:59:44 +01:00
'/nowplaying/{station_id}' :
get :
2018-09-18 16:09:48 +02:00
tags :
2019-01-03 11:59:44 +01:00
- 'Now Playing'
description : 'Returns a full summary of the specified station' 's current state.'
operationId : 'App\Controller\Api\NowplayingController::__invoke'
2018-09-18 16:09:48 +02:00
parameters :
-
$ref : '#/components/parameters/station_id_required'
responses :
'200' :
description : Success
'404' :
description : 'Station not found'
2019-01-29 23:32:32 +01:00
'/station/{station_id}/history' :
get :
tags :
- 'Stations : History'
description : 'Return song playback history items for a given station.'
operationId : 'App\Controller\Api\Stations\HistoryController::__invoke'
parameters :
-
$ref : '#/components/parameters/station_id_required'
-
name : start
in : query
description : 'The start date for records, in YYYY-MM-DD format.'
required : false
schema :
type : string
-
name : end
in : query
description : 'The end date for records, in YYYY-MM-DD format.'
required : false
schema :
type : string
responses :
'200' :
description : Success
content :
application/json :
schema :
type : array
items :
$ref : '#/components/schemas/Api_DetailedSongHistory'
'404' :
description : 'Station not found'
'403' :
description : 'Access denied'
security :
-
api_key : [ ]
2018-09-18 16:09:48 +02:00
/stations :
get :
tags :
- 'Stations : General'
description : 'Returns a list of stations.'
operationId : 'App\Controller\Api\Stations\IndexController::listAction'
2018-12-22 18:27:41 +01:00
parameters : [ ]
2018-09-18 16:09:48 +02:00
responses :
'200' :
description : Success
2019-01-03 11:59:44 +01:00
content :
application/json :
schema :
type : array
items :
$ref : '#/components/schemas/Api_Station'
2018-09-18 16:09:48 +02:00
'/station/{station_id}' :
get :
tags :
- 'Stations : General'
description : 'Return information about a single station.'
operationId : 'App\Controller\Api\Stations\IndexController::indexAction'
2019-01-03 11:59:44 +01:00
parameters :
-
$ref : '#/components/parameters/station_id_required'
responses :
'200' :
description : Success
content :
application/json :
schema :
$ref : '#/components/schemas/Api_Station'
'404' :
description : 'Station not found'
'/station/{station_id}/listeners' :
get :
tags :
- 'Stations : Listeners'
description : 'Return detailed information about current listeners.'
operationId : 'App\Controller\Api\Stations\ListenersController::indexAction'
2018-09-18 16:09:48 +02:00
parameters :
-
$ref : '#/components/parameters/station_id_required'
responses :
'200' :
description : Success
2019-01-29 23:32:32 +01:00
content :
application/json :
schema :
type : array
items :
$ref : '#/components/schemas/Api_Listener'
2018-09-18 16:09:48 +02:00
'404' :
description : 'Station not found'
2019-01-03 11:59:44 +01:00
'403' :
description : 'Access denied'
security :
-
2019-01-03 12:35:38 +01:00
api_key : [ ]
2018-09-18 16:09:48 +02:00
'/station/{station_id}/art/{media_id}' :
get :
tags :
- 'Stations : Media'
description : 'Returns the album art for a song, or a generic image.'
operationId : 'App\Controller\Api\Stations\MediaController::artAction'
parameters :
-
$ref : '#/components/parameters/station_id_required'
-
name : media_id
in : path
2018-12-22 18:27:41 +01:00
description : 'The station media unique ID'
2018-09-18 16:09:48 +02:00
required : true
schema :
2018-12-22 18:27:41 +01:00
type : string
2018-09-18 16:09:48 +02:00
responses :
'200' :
description : 'The requested album artwork'
'404' :
description : 'Image not found; generic filler image.'
2018-12-24 09:47:45 +01:00
'/station/{station_id}/queue' :
get :
tags :
2019-01-03 11:59:44 +01:00
- 'Stations : Queue'
2018-12-24 09:47:45 +01:00
description : 'Return information about the upcoming song playback queue.'
operationId : 'App\Controller\Api\Stations\QueueController::listAction'
parameters :
-
$ref : '#/components/parameters/station_id_required'
responses :
'200' :
description : Success
2019-01-03 11:59:44 +01:00
content :
application/json :
schema :
type : array
items :
$ref : '#/components/schemas/Api_QueuedSong'
2018-12-24 09:47:45 +01:00
'404' :
description : 'Station not found'
'403' :
description : 'Access denied'
security :
-
2019-01-03 12:35:38 +01:00
api_key : [ ]
2019-01-03 11:59:44 +01:00
'/station/{station_id}/queue/{id}' :
get :
tags :
- 'Stations : Queue'
description : 'Retrieve details of a single queued item.'
parameters :
-
name : id
in : path
description : 'Queue Item ID'
required : true
schema :
type : integer
format : int64
responses :
'200' :
description : Success
content :
application/json :
schema :
$ref : '#/components/schemas/Api_QueuedSong'
'404' :
description : 'Station or Queue ID not found'
'403' :
description : 'Access denied'
security :
-
2019-01-03 12:35:38 +01:00
api_key : [ ]
2019-01-03 11:59:44 +01:00
delete :
tags :
- 'Stations : Queue'
2019-03-01 03:30:25 +01:00
description : 'Delete a single queued item.'
2019-01-03 11:59:44 +01:00
parameters :
-
name : id
in : path
description : 'Queue Item ID'
required : true
schema :
type : integer
format : int64
responses :
'200' :
description : Success
content :
application/json :
schema :
$ref : '#/components/schemas/Api_Status'
'404' :
description : 'Station or Queue ID not found'
'403' :
description : 'Access denied'
security :
-
2019-01-03 12:35:38 +01:00
api_key : [ ]
2019-01-03 11:59:44 +01:00
'/station/{station_id}/requests' :
get :
tags :
- 'Stations : Song Requests'
description : 'Return a list of requestable songs.'
operationId : 'App\Controller\Api\Stations\RequestsController::listAction'
parameters :
-
$ref : '#/components/parameters/station_id_required'
responses :
'200' :
description : Success
'404' :
description : 'Station not found'
'403' :
description : 'Station does not support requests'
'/station/{station_id}/request/{request_id}' :
post :
tags :
- 'Stations : Song Requests'
description : 'Submit a song request.'
operationId : 'App\Controller\Api\Stations\RequestsController::submitAction'
parameters :
-
$ref : '#/components/parameters/station_id_required'
-
name : request_id
in : path
description : 'The requestable song ID'
required : true
schema :
type : int64
responses :
'200' :
description : Success
'404' :
description : 'Station not found'
'403' :
description : 'Station does not support requests'
2019-01-29 23:32:32 +01:00
'/station/{station_id}/status' :
get :
tags :
- 'Stations : Service Control'
description : 'Retrieve the current status of all serivces associated with the radio broadcast.'
operationId : 'App\Controller\Api\Stations\ServicesController::statusAction'
parameters :
-
$ref : '#/components/parameters/station_id_required'
responses :
'200' :
description : Success
'403' :
description : 'Access Forbidden'
security :
-
api_key : [ ]
2018-09-18 16:09:48 +02:00
'/station/{station_id}/restart' :
post :
tags :
- 'Stations : Service Control'
description : 'Restart all services associated with the radio broadcast.'
operationId : 'App\Controller\Api\Stations\ServicesController::restartAction'
parameters :
-
$ref : '#/components/parameters/station_id_required'
responses :
'200' :
description : Success
'403' :
description : 'Access Forbidden'
security :
-
2019-01-03 12:35:38 +01:00
api_key : [ ]
2018-09-18 16:09:48 +02:00
'/station/{station_id}/frontend/{action}' :
post :
tags :
- 'Stations : Service Control'
description : 'Perform service control actions on the radio frontend (Icecast, SHOUTcast, etc.)'
operationId : 'App\Controller\Api\Stations\ServicesController::frontendAction'
parameters :
-
$ref : '#/components/parameters/station_id_required'
-
name : action
in : path
description : 'The action to perform (start, stop, restart)'
required : false
schema :
type : string
content : restart
responses :
'200' :
description : Success
'403' :
description : 'Access Forbidden'
security :
-
2019-01-03 12:35:38 +01:00
api_key : [ ]
2018-09-18 16:09:48 +02:00
'/station/{station_id}/backend/{action}' :
post :
tags :
- 'Stations : Service Control'
description : 'Perform service control actions on the radio backend (Liquidsoap)'
operationId : 'App\Controller\Api\Stations\ServicesController::backendAction'
parameters :
-
$ref : '#/components/parameters/station_id_required'
-
name : action
in : path
2019-04-07 02:06:39 +02:00
description: 'The action to perform (for all: start, stop, restart; for Liquidsoap only : skip, disconnect)'
2018-09-18 16:09:48 +02:00
required : false
schema :
type : string
content : restart
responses :
'200' :
description : Success
'403' :
description : 'Access Forbidden'
security :
-
2019-01-03 12:35:38 +01:00
api_key : [ ]
2018-09-18 16:09:48 +02:00
components :
schemas :
2019-01-06 09:57:09 +01:00
Api_Admin_Settings :
properties :
base_url :
description : 'Site Base URL'
type : string
instance_name :
description : 'AzuraCast Instance Name'
type : string
timezone :
description : 'System Default Time Zone'
type : string
prefer_browser_url :
description : 'Prefer Browser URL (If Available)'
type : integer
use_radio_proxy :
description : 'Use Web Proxy for Radio'
type : integer
history_keep_days :
description : 'Days of Playback History to Keep'
type : integer
2019-01-29 23:32:32 +01:00
always_use_ssl :
description : 'Always Use HTTPS'
type : integer
api_access_control :
description : 'API "Access-Control-Allow-Origin" header'
type : string
2019-01-06 09:57:09 +01:00
analytics :
description : 'Listener Analytics Collection'
type : string
central_updates_channel :
description : 'Check for Updates and Announcements'
type : integer
public_theme :
description : 'Base Theme for Public Pages'
type : string
hide_album_art :
description : 'Hide Album Art on Public Pages'
type : integer
homepage_redirect_url :
description : 'Homepage Redirect URL'
type : string
default_album_art_url :
description : 'Default Album Art URL'
type : string
hide_product_name :
description : 'Hide AzuraCast Branding on Public Pages'
type : integer
custom_css_public :
description : 'Custom CSS for Public Pages'
type : string
custom_js_public :
description : 'Custom JS for Public Pages'
type : string
custom_css_internal :
description : 'Custom CSS for Internal Pages'
type : string
type : object
2018-12-22 18:27:41 +01:00
Api_DetailedSongHistory :
2018-09-18 16:09:48 +02:00
allOf :
-
2018-12-22 18:27:41 +01:00
$ref : '#/components/schemas/Api_SongHistory'
2018-09-18 16:09:48 +02:00
-
properties :
listeners_start :
description : 'Number of listeners when the song playback started.'
type : integer
example : 94
listeners_end :
description : 'Number of listeners when song playback ended.'
type : integer
example : 105
delta_total :
description : 'The sum total change of listeners between the song' 's start and ending.'
type : integer
example : 11
type : object
2018-12-22 18:27:41 +01:00
Api_Error :
2018-09-18 16:09:48 +02:00
properties :
code :
description : 'The numeric code of the error.'
type : integer
example : 500
message :
description : 'The text description of the error.'
type : string
example : 'Error description.'
2019-03-25 01:12:04 +01:00
formatted_message :
description : 'The HTML-formatted text description of the error.'
type : string
example : '<b>Error description.</b><br>Detailed error text.'
extra_data :
description : 'Stack traces and other supplemental data.'
2018-09-18 16:09:48 +02:00
type : array
items : { }
success :
description : 'Used for API calls that expect an \Entity\Api\Status type response.'
type : boolean
example : false
type : object
2018-12-22 18:27:41 +01:00
Api_Listener :
2018-09-18 16:09:48 +02:00
properties :
ip :
description : 'The listener' 's IP address'
type : string
example : 127.0 .0 .1
user_agent :
description : 'The listener' 's HTTP User-Agent'
type : string
example : 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.86 Safari/537.36'
is_mobile :
description : 'Whether the user-agent is likely a mobile browser.'
type : boolean
example : true
connected_on :
description : 'UNIX timestamp that the user first connected.'
type : integer
2019-04-07 02:06:39 +02:00
example : 1554541360
2018-09-18 16:09:48 +02:00
connected_time :
description : 'Number of seconds that the user has been connected.'
type : integer
example : 30
location :
description : 'Location metadata, if available'
type : array
items : { }
type : object
2018-12-22 18:27:41 +01:00
Api_NewRecord :
allOf :
-
$ref : '#/components/schemas/Api_Status'
-
properties :
links :
type : array
items :
type : string
example : 'http://localhost/api/record/1'
type : object
Api_NowPlaying :
2018-09-18 16:09:48 +02:00
properties :
station :
2018-12-22 18:27:41 +01:00
$ref : '#/components/schemas/Api_Station'
2018-09-18 16:09:48 +02:00
listeners :
2018-12-22 18:27:41 +01:00
$ref : '#/components/schemas/Api_NowPlayingListeners'
2018-09-18 16:09:48 +02:00
live :
2018-12-22 18:27:41 +01:00
$ref : '#/components/schemas/Api_NowPlayingLive'
2018-09-18 16:09:48 +02:00
now_playing :
2018-12-22 18:27:41 +01:00
$ref : '#/components/schemas/Api_NowPlayingCurrentSong'
2018-09-18 16:09:48 +02:00
playing_next :
2018-12-22 18:27:41 +01:00
$ref : '#/components/schemas/Api_SongHistory'
2018-09-18 16:09:48 +02:00
song_history :
type : array
items :
2018-12-22 18:27:41 +01:00
$ref : '#/components/schemas/Api_SongHistory'
2018-09-18 16:09:48 +02:00
cache :
description : 'Debugging information about where the now playing data comes from.'
type : string
enum :
- hit
- database
- station
type : object
2018-12-22 18:27:41 +01:00
Api_NowPlayingCurrentSong :
2018-09-18 16:09:48 +02:00
allOf :
-
2018-12-22 18:27:41 +01:00
$ref : '#/components/schemas/Api_SongHistory'
2018-09-18 16:09:48 +02:00
-
properties :
elapsed :
description : 'Elapsed time of the song' 's playback since it started.'
type : integer
example : 25
remaining :
description : 'Remaining time in the song, in seconds.'
type : integer
example : 155
type : object
2018-12-22 18:27:41 +01:00
Api_NowPlayingListeners :
2018-09-18 16:09:48 +02:00
properties :
current :
description : 'Current listeners, either unique (if supplied) or total (non-unique)'
type : integer
example : 15
unique :
description : 'Total unique current listeners'
type : integer
example : 15
total :
description : 'Total non-unique current listeners'
type : integer
example : 20
type : object
2018-12-22 18:27:41 +01:00
Api_NowPlayingLive :
2018-09-18 16:09:48 +02:00
properties :
is_live :
description : 'Whether the stream is known to currently have a live DJ.'
type : boolean
example : false
streamer_name :
description : 'The current active streamer/DJ, if one is available.'
type : string
example : 'DJ Jazzy Jeff'
type : object
2018-12-22 18:27:41 +01:00
Api_QueuedSong :
allOf :
-
$ref : '#/components/schemas/Api_SongHistory'
-
properties :
cued_at :
description : 'UNIX timestamp when the item was cued for playback.'
type : integer
2019-04-07 02:06:39 +02:00
example : 1554541360
2018-12-22 18:27:41 +01:00
autodj_custom_uri :
description : 'Custom AutoDJ playback URI, if it exists.'
type : string
example : ''
links :
type : array
items :
type : string
example : 'http://localhost/api/stations/1/queue/1'
type : object
Api_Song :
2018-09-18 16:09:48 +02:00
properties :
id :
description : 'The song' 's 32-character unique identifier hash'
type : string
example : 9f33bbc912c19603e51be8e0987d076b
text :
description : 'The song title, usually "Artist - Title"'
type : string
example : 'Chet Porter - Aluko River'
artist :
description : 'The song artist.'
type : string
example : 'Chet Porter'
title :
description : 'The song title.'
type : string
example : 'Aluko River'
album :
description : 'The song album.'
type : string
example : 'Moving Castle'
lyrics :
description : 'Lyrics to the song.'
type : string
example : ''
art :
description : 'URL to the album artwork (if available).'
type : string
example : 'https://picsum.photos/1200/1200'
custom_fields :
type : array
items :
type : string
example : custom_field_value
type : object
2018-12-22 18:27:41 +01:00
Api_SongHistory :
2018-09-18 16:09:48 +02:00
properties :
sh_id :
description : 'Song history unique identifier'
type : integer
played_at :
description : 'UNIX timestamp when playback started.'
type : integer
2019-04-07 02:06:39 +02:00
example : 1554541360
2018-09-18 16:09:48 +02:00
duration :
description : 'Duration of the song in seconds'
type : integer
example : 180
playlist :
description : 'Indicates the playlist that the song was played from, if available, or empty string if not.'
type : string
example : 'Top 100'
is_request :
description : 'Indicates whether the song is a listener request.'
type : boolean
song :
2018-12-22 18:27:41 +01:00
$ref : '#/components/schemas/Api_Song'
2018-09-18 16:09:48 +02:00
type : object
2018-12-22 18:27:41 +01:00
Api_Station :
2018-09-18 16:09:48 +02:00
properties :
id :
description : 'Station ID'
type : integer
example : 1
name :
description : 'Station name'
type : string
example : 'AzuraTest Radio'
shortcode :
description : 'Station "short code", used for URL and folder paths'
type : string
example : azuratest_radio
description :
description : 'Station description'
type : string
example : 'An AzuraCast station!'
frontend :
description : 'Which broadcasting software (frontend) the station uses'
type : string
example : shoutcast2
backend :
description : 'Which AutoDJ software (backend) the station uses'
type : string
example : liquidsoap
listen_url :
description : 'The full URL to listen to the default mount of the station'
type : string
example : 'http://localhost:8000/radio.mp3'
is_public :
description : 'If the station is public (i.e. should be shown in listings of all stations)'
type : boolean
example : true
mounts :
type : array
items :
2018-12-22 18:27:41 +01:00
$ref : '#/components/schemas/Api_StationMount'
2018-09-18 16:09:48 +02:00
remotes :
type : array
items :
2018-12-22 18:27:41 +01:00
$ref : '#/components/schemas/Api_StationRemote'
2018-09-18 16:09:48 +02:00
type : object
2018-12-22 18:27:41 +01:00
Api_StationMount :
2019-03-25 01:12:04 +01:00
allOf :
-
$ref : '#/components/schemas/Api_StationRemote'
-
properties :
is_default :
description : 'If the mount is the default mount for the parent station'
type : boolean
example : true
type : object
Api_StationRemote :
2018-09-18 16:09:48 +02:00
properties :
name :
description : 'Mount point name/URL'
type : string
example : /radio.mp3
url :
description : 'Full listening URL specific to this mount'
type : string
example : 'http://localhost:8000/radio.mp3'
bitrate :
description : 'Bitrate (kbps) of the broadcasted audio (if known)'
type : integer
example : 128
format :
description : 'Audio encoding format of broadcasted audio (if known)'
type : string
example : mp3
type : object
2018-12-22 18:27:41 +01:00
Api_StationRequest :
2018-09-18 16:09:48 +02:00
properties :
request_id :
description : 'Requestable ID unique identifier'
2018-11-26 21:54:49 +01:00
type : string
2018-09-18 16:09:48 +02:00
example : 1
request_url :
description : 'URL to directly submit request'
2018-11-26 21:54:49 +01:00
type : string
2018-09-18 16:09:48 +02:00
example : /api/station/1/request/1
song :
2018-12-22 18:27:41 +01:00
$ref : '#/components/schemas/Api_Song'
2018-09-18 16:09:48 +02:00
type : object
2019-01-29 23:32:32 +01:00
Api_StationServiceStatus :
properties :
backend_running :
type : boolean
example : true
frontend_running :
type : boolean
example : true
type : object
2018-12-22 18:27:41 +01:00
Api_Status :
2018-09-18 16:09:48 +02:00
properties :
success :
type : boolean
example : true
message :
type : string
example : 'Changes saved successfully.'
2019-03-25 01:12:04 +01:00
formatted_message :
type : string
example : '<b>Changes saved successfully.</b>'
2018-09-18 16:09:48 +02:00
type : object
2018-12-22 18:27:41 +01:00
Api_SystemStatus :
2018-09-18 16:09:48 +02:00
properties :
online :
description : 'Whether the service is online or not (should always be true)'
type : boolean
example : true
timestamp :
description : 'The current UNIX timestamp'
type : integer
2019-04-07 02:06:39 +02:00
example : 1554541360
2018-09-18 16:09:48 +02:00
type : object
2018-12-22 18:27:41 +01:00
Api_Time :
2018-09-18 16:09:48 +02:00
properties :
timestamp :
description : 'The current UNIX timestamp'
type : integer
example : 1497652397
gmt_datetime :
type : string
example : '2017-06-16 10:33:17'
gmt_date :
type : string
example : 'June 16, 2017'
gmt_time :
type : string
example : '10:33pm'
gmt_timezone :
type : string
example : GMT
gmt_timezone_abbr :
type : string
example : GMT
local_datetime :
type : string
example : '2017-06-16 10:33:17'
local_date :
type : string
example : 'June 16, 2017'
local_time :
type : string
example : '10:33pm'
local_timezone :
type : string
example : UTC
local_timezone_abbr :
type : string
example : UTC
type : object
2019-01-29 23:32:32 +01:00
CustomField :
properties :
id :
type : integer
name :
type : string
short_name :
description : 'The programmatic name for the field. Can be auto-generated from the full name.'
type : string
type : object
2019-01-05 13:02:49 +01:00
Role :
properties :
id :
type : integer
example : 1
name :
type : string
example : 'Super Administrator'
permissions :
items : { }
type : object
2018-12-22 18:27:41 +01:00
Station :
type : object
User :
properties :
id :
type : integer
example : 1
email :
type : string
example : demo@azuracast.com
auth_password :
type : string
example : ''
name :
type : string
example : 'Demo Account'
timezone :
type : string
example : America/Chicago
locale :
type : string
example : en_US
theme :
type : string
example : dark
2019-03-25 01:12:04 +01:00
two_factor_secret :
type : string
example : A1B2C3D4
2018-12-22 18:27:41 +01:00
created_at :
type : integer
2019-04-07 02:06:39 +02:00
example : 1554541360
2018-12-22 18:27:41 +01:00
updated_at :
type : integer
2019-04-07 02:06:39 +02:00
example : 1554541360
2018-12-22 18:27:41 +01:00
roles :
items : { }
type : object
2018-09-18 16:09:48 +02:00
responses :
todo :
description : 'This API call has no documented response (yet)'
parameters :
station_id_required :
name : station_id
in : path
description : 'The station ID'
required : true
schema :
type : int64
example : 1
securitySchemes :
api_key :
type : apiKey
name : X-API-Key
in : header
tags :
-
name : 'Now Playing'
description : 'Endpoints that provide full summaries of the current state of stations.'
-
name: 'Stations : General'
-
name: 'Stations : Song Requests'
2019-01-29 23:32:32 +01:00
-
name: 'Stations : History'
2018-09-18 16:09:48 +02:00
-
name: 'Stations : Listeners'
2019-01-03 11:59:44 +01:00
-
name: 'Stations : Media'
-
name: 'Stations : Queue'
-
name: 'Stations : Service Control'
2019-01-29 23:32:32 +01:00
-
name: 'Administration : Custom Fields'
2019-01-03 11:59:44 +01:00
-
name: 'Administration : Users'
2019-01-05 13:02:49 +01:00
-
name: 'Administration : Roles'
2019-01-06 09:57:09 +01:00
-
name: 'Administration : Settings'
2019-01-03 11:59:44 +01:00
-
name : Miscellaneous
2018-09-18 16:09:48 +02:00
externalDocs :
description : 'AzuraCast on GitHub'
url : 'https://github.com/AzuraCast/AzuraCast'