From b872c146d7baf53fb73562f4b23f9918555cd4dc Mon Sep 17 00:00:00 2001 From: Kyle Robbertze Date: Mon, 21 Oct 2019 20:40:29 +0200 Subject: [PATCH] add OpenAPI doc of the current API --- docs/api/openapi.yaml | 1343 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1343 insertions(+) create mode 100644 docs/api/openapi.yaml diff --git a/docs/api/openapi.yaml b/docs/api/openapi.yaml new file mode 100644 index 000000000..6f382aba2 --- /dev/null +++ b/docs/api/openapi.yaml @@ -0,0 +1,1343 @@ +--- +openapi: "3.0.0" +info: + title: LibreTime API overview + version: 1.1 +paths: + /live-info: + get: + summary: Retrieve the currently playing show as well as upcoming shows + parameters: + - name: api_key + in: path + description: The API key to use for authentication + required: false + - name: type + in: path + description: |- + endofday retrieves the info for shows up until the end of the day, + while interval will return shows in the next 48 hours + schema: + enum: + - 'endofday' + - 'interval' + default: 'interval' + required: false + - name: limit + in: path + description: the number of shows to retrieve + schema: + type: integer + default: 5 + required: false + responses: + '200': + description: 200 response for default request + content: + application/json: + example: { + "env": "production", + "schedulerTime": "2019-10-21 17:52:45", + "previous": { + "starts": "2019-10-21 17:47:25.000000", + "ends": "2019-10-21 17:52:13.000000", + "type": "track", + "name": "Disclosure - F For You (feat. Mary J. Blige)", + "metadata": { + "id": 8, + "name": "", + "mime": "audio/mp3", + "ftype": "audioclip", + "directory": 1, + "filepath": "imported/1/Disclosure/www.mmibty.com/01-F-For-You-feat.-Mary-J.-Blige.mp3", + "import_status": 0, + "currentlyaccessing": 0, + "editedby": null, + "mtime": "2019-10-21 17:19:03", + "utime": "2019-10-21 17:18:57", + "lptime": "2019-10-21 17:47:25", + "md5": "e008616551750aea49820a16d1fb1527", + "track_title": "F For You (feat. Mary J. Blige)", + "artist_name": "Disclosure", + "bit_rate": 251628, + "sample_rate": 44100, + "format": null, + "length": "00:04:48.026122", + "album_title": "www.mmibty.com", + "genre": "Electronic", + "comments": null, + "year": "2014", + "track_number": 1, + "channels": 2, + "url": null, + "bpm": null, + "rating": null, + "encoded_by": null, + "disc_number": null, + "mood": null, + "label": null, + "composer": null, + "encoder": null, + "checksum": null, + "lyrics": null, + "orchestra": null, + "conductor": null, + "lyricist": null, + "original_lyricist": null, + "radio_station_name": null, + "info_url": null, + "artist_url": null, + "audio_source_url": null, + "radio_station_url": null, + "buy_this_url": null, + "isrc_number": null, + "catalog_number": null, + "original_artist": null, + "copyright": null, + "report_datetime": null, + "report_location": null, + "report_organization": null, + "subject": null, + "contributor": null, + "language": null, + "soundcloud_id": null, + "soundcloud_error_code": null, + "soundcloud_error_msg": null, + "soundcloud_link_to_file": null, + "soundcloud_upload_time": null, + "replay_gain": "-5.58", + "owner_id": 1, + "cuein": "00:00:00", + "cueout": "00:04:48.026122", + "hidden": false, + "filesize": 9271626, + "description": null, + "artwork": "imported/1/artwork/01-F-For-You-feat.-Mary-J.-Blige", + "artwork_url": "http://localhost:8080/api/track?id=8&return=artwork" + } + }, + "current": { + "starts": "2019-10-21 17:52:13", + "ends": "2019-10-21 17:56:27", + "type": "track", + "name": "Armin van Buuren - Ping Pong", + "media_item_played": true, + "metadata": { + "id": 2, + "name": "", + "mime": "audio/mp3", + "ftype": "audioclip", + "directory": 1, + "filepath": "imported/1/Armin van Buuren/A State of Trance 2014/2-18 Armin van Buuren - Ping Pong.mp3", + "import_status": 0, + "currentlyaccessing": 0, + "editedby": null, + "mtime": "2019-10-21 17:18:02", + "utime": "2019-10-21 17:18:00", + "lptime": "2019-10-21 17:52:13", + "md5": "04c26823902065db0706d121d0e703a2", + "track_title": "Ping Pong", + "artist_name": "Armin van Buuren", + "bit_rate": 32000, + "sample_rate": 44100, + "format": null, + "length": "00:04:14.171429", + "album_title": "A State of Trance 2014", + "genre": "Trance;Electronic;Dance", + "comments": null, + "year": "2014", + "track_number": 18, + "channels": 2, + "url": null, + "bpm": null, + "rating": null, + "encoded_by": null, + "disc_number": null, + "mood": null, + "label": "Armada Music", + "composer": null, + "encoder": null, + "checksum": null, + "lyrics": null, + "orchestra": null, + "conductor": null, + "lyricist": null, + "original_lyricist": null, + "radio_station_name": null, + "info_url": null, + "artist_url": null, + "audio_source_url": null, + "radio_station_url": null, + "buy_this_url": null, + "isrc_number": null, + "catalog_number": null, + "original_artist": null, + "copyright": null, + "report_datetime": null, + "report_location": null, + "report_organization": null, + "subject": null, + "contributor": null, + "language": null, + "soundcloud_id": null, + "soundcloud_error_code": null, + "soundcloud_error_msg": null, + "soundcloud_link_to_file": null, + "soundcloud_upload_time": null, + "replay_gain": "-5.07", + "owner_id": 1, + "cuein": "00:00:00", + "cueout": "00:04:14.171429", + "hidden": false, + "filesize": 6136238, + "description": null, + "artwork": "imported/1/artwork/2-18 Armin van Buuren - Ping Pong", + "artwork_url": "http://localhost:8080/api/track?id=2&return=artwork" + }, + "record": "0" + }, + "next": { + "starts": "2019-10-21 17:56:27.000000", + "ends": "2019-10-21 18:00:28.000000", + "type": "track", + "name": "Bastille - No Angels (feat. Ella)", + "metadata": { + "id": 4, + "name": "", + "mime": "audio/mp3", + "ftype": "audioclip", + "directory": 1, + "filepath": "imported/1/Bastille/Other People's Heartache, Pt. 2/03 Bastille - No Angels (feat. Ella).mp3", + "import_status": 0, + "currentlyaccessing": 0, + "editedby": null, + "mtime": "2019-10-21 17:18:16", + "utime": "2019-10-21 17:18:14", + "lptime": "2019-10-21 17:24:46", + "md5": "87bf83451d7618eefc0141c262aead2a", + "track_title": "No Angels (feat. Ella)", + "artist_name": "Bastille", + "bit_rate": 128000, + "sample_rate": 44100, + "format": null, + "length": "00:04:00.752438", + "album_title": "Other People's Heartache, Pt. 2", + "genre": null, + "comments": null, + "year": "2012", + "track_number": 3, + "channels": 2, + "url": null, + "bpm": null, + "rating": null, + "encoded_by": null, + "disc_number": null, + "mood": null, + "label": "[no label]", + "composer": null, + "encoder": null, + "checksum": null, + "lyrics": null, + "orchestra": null, + "conductor": null, + "lyricist": null, + "original_lyricist": null, + "radio_station_name": null, + "info_url": null, + "artist_url": null, + "audio_source_url": null, + "radio_station_url": null, + "buy_this_url": null, + "isrc_number": null, + "catalog_number": null, + "original_artist": null, + "copyright": null, + "report_datetime": null, + "report_location": null, + "report_organization": null, + "subject": null, + "contributor": null, + "language": null, + "soundcloud_id": null, + "soundcloud_error_code": null, + "soundcloud_error_msg": null, + "soundcloud_link_to_file": null, + "soundcloud_upload_time": null, + "replay_gain": "-8.57", + "owner_id": 1, + "cuein": "00:00:00", + "cueout": "00:04:00.752438", + "hidden": false, + "filesize": 3858688, + "description": null, + "artwork": "" + } + }, + "currentShow": [ + { + "start_timestamp": "2019-10-21 17:20:00", + "end_timestamp": "2019-10-21 18:31:00", + "name": "Show 1", + "description": "A show", + "id": 1, + "instance_id": 1, + "record": 0, + "url": "https://example.com", + "image_path": "", + "starts": "2019-10-21 17:20:00", + "ends": "2019-10-21 18:31:00" + } + ], + "nextShow": [ + { + "id": 2, + "instance_id": 2, + "name": "Reading", + "description": "A reading of After the EMP by Harley Tate", + "url": "https://example.com", + "start_timestamp": "2019-10-21 18:31:00", + "end_timestamp": "2019-10-22 10:45:00", + "starts": "2019-10-21 18:31:00", + "ends": "2019-10-22 10:45:00", + "record": 0, + "image_path": "", + "type": "show" + } + ], + "source_enabled": "Scheduled", + "timezone": "UTC", + "timezoneOffset": "0", + "AIRTIME_API_VERSION": "1.1" + } + /live-info-v2: + get: + summary: Retrieve the currently playing and upcoming shows + parameters: + - name: api_key + in: path + description: The API key to use for authentication + required: true + - name: days + in: path + description: The number of days to return + schema: + type: integer + default: 2 + required: false + - show_id: shows + in: path + description: the number of shows to retrieve + schema: + type: integer + default: 5 + required: false + - name: timezone + in: path + description: The timezone to send the times in + schema: + type: string + default: "$server_timezone" + required: false + responses: + '200': + description: 200 response for default request + content: + application/json: + example: { + "station": { + "env": "production", + "schedulerTime": "2019-10-21 17:29:40", + "source_enabled": "Scheduled", + "timezone": "UTC", + "AIRTIME_API_VERSION": "1.1" + }, + "tracks": { + "previous": { + "starts": "2019-10-21 17:24:45", + "ends": "2019-10-21 17:28:46", + "type": "track", + "name": "Bastille - No Angels (feat. Ella)", + "metadata": { + "id": 4, + "name": "", + "mime": "audio/mp3", + "ftype": "audioclip", + "directory": 1, + "filepath": "imported/1/Bastille/Other People's Heartache, Pt. 2/03 Bastille - No Angels (feat. Ella).mp3", + "import_status": 0, + "currentlyaccessing": 0, + "editedby": null, + "mtime": "2019-10-21 17:18:16", + "utime": "2019-10-21 17:18:14", + "lptime": "2019-10-21 17:24:46", + "md5": "87bf83451d7618eefc0141c262aead2a", + "track_title": "No Angels (feat. Ella)", + "artist_name": "Bastille", + "bit_rate": 128000, + "sample_rate": 44100, + "format": null, + "length": "00:04:00.752438", + "album_title": "Other People's Heartache, Pt. 2", + "genre": null, + "comments": null, + "year": "2012", + "track_number": 3, + "channels": 2, + "url": null, + "bpm": null, + "rating": null, + "encoded_by": null, + "disc_number": null, + "mood": null, + "label": "[no label]", + "composer": null, + "encoder": null, + "checksum": null, + "lyrics": null, + "orchestra": null, + "conductor": null, + "lyricist": null, + "original_lyricist": null, + "radio_station_name": null, + "info_url": null, + "artist_url": null, + "audio_source_url": null, + "radio_station_url": null, + "buy_this_url": null, + "isrc_number": null, + "catalog_number": null, + "original_artist": null, + "copyright": null, + "report_datetime": null, + "report_location": null, + "report_organization": null, + "subject": null, + "contributor": null, + "language": null, + "soundcloud_id": null, + "soundcloud_error_code": null, + "soundcloud_error_msg": null, + "soundcloud_link_to_file": null, + "soundcloud_upload_time": null, + "replay_gain": "-8.57", + "owner_id": 1, + "cuein": "00:00:00", + "cueout": "00:04:00.752438", + "hidden": false, + "filesize": 3858688, + "description": null, + "artwork": "" + } + }, + "current": null, + "next": { + "starts": "2019-10-21 17:32:49", + "ends": "2019-10-21 17:36:44", + "type": "track", + "name": "Bob Marley - Could You Be Loved", + "metadata": { + "id": 14, + "name": "", + "mime": "audio/mp3", + "ftype": "audioclip", + "directory": 1, + "filepath": "imported/1/Bob Marley/Greatest Hits/02. Could You Be Loved.mp3", + "import_status": 0, + "currentlyaccessing": 0, + "editedby": null, + "mtime": "2019-10-21 17:19:16", + "utime": "2019-10-21 17:18:59", + "lptime": null, + "md5": "75e49569fd6af61cc8c18f5660beadc2", + "track_title": "Could You Be Loved", + "artist_name": "Bob Marley", + "bit_rate": 128000, + "sample_rate": 44100, + "format": null, + "length": "00:03:55.11", + "album_title": "Greatest Hits", + "genre": "Various", + "comments": null, + "year": null, + "track_number": 2, + "channels": 2, + "url": null, + "bpm": 103, + "rating": null, + "encoded_by": null, + "disc_number": null, + "mood": null, + "label": null, + "composer": null, + "encoder": null, + "checksum": null, + "lyrics": null, + "orchestra": null, + "conductor": null, + "lyricist": null, + "original_lyricist": null, + "radio_station_name": null, + "info_url": null, + "artist_url": null, + "audio_source_url": null, + "radio_station_url": null, + "buy_this_url": null, + "isrc_number": null, + "catalog_number": null, + "original_artist": null, + "copyright": null, + "report_datetime": null, + "report_location": null, + "report_organization": null, + "subject": null, + "contributor": null, + "language": null, + "soundcloud_id": null, + "soundcloud_error_code": null, + "soundcloud_error_msg": null, + "soundcloud_link_to_file": null, + "soundcloud_upload_time": null, + "replay_gain": "-1.2", + "owner_id": 1, + "cuein": "00:00:00", + "cueout": "00:03:55.11", + "hidden": false, + "filesize": 3773820, + "description": null, + "artwork": "" + } + } + }, + "shows": { + "previous": [], + "current": { + "name": "Show 1", + "description": "A show", + "genre": "HipHop", + "id": 1, + "instance_id": 1, + "record": 0, + "url": "https://example.com", + "image_path": "", + "starts": "2019-10-21 17:20:00", + "ends": "2019-10-21 18:31:00" + }, + "next": [ + { + "name": "Reading", + "description": "A reading of After the EMP by Harley Tate", + "genre": "Sci-fi", + "id": 2, + "instance_id": 2, + "record": 0, + "url": "https://example.com", + "image_path": "", + "starts": "2019-10-21 18:31:00", + "ends": "2019-10-22 10:45:00" + } + ] + }, + "sources": { + "livedj": "off", + "masterdj": "off", + "scheduledplay": "on" + } + } + /week-info: + get: + summary: Retrieve the schedule for the week + parameters: + - name: api_key + in: path + description: The API key to use for authentication + required: false + responses: + '200': + description: 200 response for default request + content: + application/json: + example: { + "monday": [ + { + "start_timestamp": "2019-10-21 17:20:00", + "end_timestamp": "2019-10-21 18:31:00", + "name": "Show 1", + "description": "A show", + "id": 1, + "instance_id": 1, + "instance_description": "", + "record": 0, + "url": "https://example.com", + "image_path": "", + "starts": "2019-10-21 17:20:00", + "ends": "2019-10-21 18:31:00" + }, + { + "start_timestamp": "2019-10-21 18:31:00", + "end_timestamp": "2019-10-22 10:45:00", + "name": "Reading", + "description": "A reading of After the EMP by Harley Tate", + "id": 2, + "instance_id": 2, + "instance_description": "", + "record": 0, + "url": "https://example.com", + "image_path": "", + "starts": "2019-10-21 18:31:00", + "ends": "2019-10-22 10:45:00" + } + ], + "tuesday": [], + "wednesday": [], + "thursday": [], + "friday": [], + "saturday": [], + "sunday": [], + "nextmonday": [], + "nexttuesday": [], + "nextwednesday": [], + "nextthursday": [], + "nextfriday": [], + "nextsaturday": [], + "nextsunday": [], + "AIRTIME_API_VERSION": "1.1" + } + /station-metadata: + get: + summary: BROKEN - Retrieve the schedule for the week + parameters: + - name: api_key + in: path + description: The API key to use for authentication + required: false + /station-logo: + get: + summary: Fetch the station logo + parameters: + - name: api_key + in: path + description: The API key to use for authentication + required: false + /show-history-feed: + get: + summary: BROKEN - Retrieve the show shedules for a given time range and show + parameters: + - name: api_key + in: path + description: The API key to use for authentication + required: false + - name: start + in: path + description: The start time for the feed + required: true + - name: end + in: path + description: The end time for the feed + required: true + - name: timezone + in: path + description: The timezone that the times are in + required: true + /item-history-feed: + get: + summary: Retrieve the items for a time range and/or show + parameters: + - name: api_key + in: path + description: The API key to use for authentication + required: false + - name: start + in: path + description: The start time for the feed + required: false + - name: end + in: path + description: The end time for the feed + required: false + - name: timezone + in: path + description: The timezone that the times are in + required: false + - name: instance_id + in: path + description: The show instance ID + required: false + responses: + '200': + description: The 200 default response + content: + application/json: + example: [ + { + "starts": "2019-10-21 18:19:07", + "ends": "2019-10-21 18:23:55", + "history_id": 16, + "instance_id": 1, + "track_title": "F For You (feat. Mary J. Blige)", + "artist_name": "Disclosure", + "checkbox": "" + }, + { + "starts": "2019-10-21 17:20:31", + "ends": "2019-10-21 17:24:45", + "history_id": 1, + "instance_id": 1, + "track_title": "Ping Pong", + "artist_name": "Armin van Buuren", + "checkbox": "" + }, + ] + /shows: + get: + summary: Retrieve the show info (without schedule for given show_id + parameters: + - name: api_key + in: path + description: The API key to use for authentication + required: false + - name: show_id + in: path + description: The ID of the show + required: false + response: + '200': + description: The response with a show_id of 1 + content: + application/json: + example: [ + { + "name": "Show 1", + "id": 1, + "url": "https://example.com", + "genre": "HipHop", + "description": "A show", + "color": "", + "background_color": "", + "linked": false, + "has_autoplaylist": false, + "autoplaylist_id": null, + "autoplaylist_repeat": false + } + ] + /show-tracks: + get: + summary: Display the track listing for given instance_id + parameters: + - name: api_key + in: path + description: The API key to use for authentication + required: false + - name: instance_id + in: path + description: The ID of the show + required: true + response: + '200': + description: The response with a instance_id of 1 + content: + application/json: + example: [ + { + "title": "Ping Pong", + "artist": "Armin van Buuren", + "position": 0, + "id": 1, + "mime": "audio/mp3", + "starts": "2019-10-21 17:20:31", + "length": "4:14.2", + "file_id": 2 + }, + { + "title": "No Angels (feat. Ella)", + "artist": "Bastille", + "position": 1, + "id": 2, + "mime": "audio/mp3", + "starts": "2019-10-21 17:24:45", + "length": "4:00.8", + "file_id": 4 + } + ] + /show-schedules: + get: + summary: Display the show schedule for given show_id + parameters: + - name: api_key + in: path + description: The API key to use for authentication + required: false + - name: show_id + in: path + description: The ID of the show + required: true + - name: start + in: path + description: The start time for the feed + required: false + - name: end + in: path + description: The end time for the feed + required: false + - name: timezone + in: path + description: The timezone that the times are in + required: false + response: + '200': + description: The response with a instance_id of 1 + content: + application/json: + example: [ + { + "starts": "2019-10-21 17:20:00", + "ends": "2019-10-21 18:31:00", + "record": 0, + "rebroadcast": 0, + "parent_starts": null, + "record_id": null, + "show_id": 1, + "name": "Show 1", + "description": "A show", + "color": "", + "background_color": "", + "image_path": "", + "linked": false, + "file_id": null, + "instance_id": 1, + "instance_description": "", + "created": "2019-10-21 17:20:22", + "last_scheduled": "2019-10-21 17:20:50", + "time_filled": "01:14:39.265872", + "soundcloud_id": null + } + ] + /show-logo: + get: + summary: Fetch the show logo. Returns the station logo if none exists + parameters: + - name: api_key + in: path + description: The API key to use for authentication + required: false + - name: id + in: path + description: The ID of the show with the logo to retrieve + required: true + /track: + get: + summary: Displays the metadata of a particular track + parameters: + - name: api_key + in: path + description: The API key to use for authentication + required: false + - name: id + in: path + description: The track id + required: true + - name: response + in: path + description: The type of response + schema: + enum: + - json + - artwork_data + - artwork + required: true + responses: + '200': + description: The 200 response + content: + application/json: + example: { + "MDATA_KEY_FILEPATH": "imported\/1\/Armin van Buuren\/Another You (feat. Mr. Probz)\/01 Another You (feat. Mr. Probz).mp3", + "MDATA_KEY_DIRECTORY": 1, + "MDATA_KEY_TITLE": "Another You (feat. Mr. Probz)", + "MDATA_KEY_CREATOR": "Armin van Buuren", + "MDATA_KEY_SOURCE": "Another You (feat. Mr. Probz)", + "MDATA_KEY_DURATION": "00:03:19.183673", + "MDATA_KEY_MIME": "audio\/mp3", + "MDATA_KEY_FTYPE": "audioclip", + "MDATA_KEY_URL": null, + "MDATA_KEY_GENRE": null, + "MDATA_KEY_MOOD": null, + "MDATA_KEY_LABEL": "Armin Audio B.V.", + "MDATA_KEY_COMPOSER": null, + "MDATA_KEY_DESCRIPTION": null, + "MDATA_KEY_SAMPLERATE": 44100, + "MDATA_KEY_BITRATE": 192000, + "MDATA_KEY_ENCODER": null, + "MDATA_KEY_ISRC": null, + "MDATA_KEY_COPYRIGHT": null, + "MDATA_KEY_YEAR": "2015", + "MDATA_KEY_BPM": null, + "MDATA_KEY_TRACKNUMBER": 1, + "MDATA_KEY_CONDUCTOR": null, + "MDATA_KEY_LANGUAGE": null, + "MDATA_KEY_REPLAYGAIN": "-8.36", + "MDATA_KEY_OWNER_ID": 1, + "MDATA_KEY_CUE_IN": "00:00:00", + "MDATA_KEY_CUE_OUT": "00:03:19.183673", + "MDATA_KEY_ARTWORK": "imported\/1\/artwork\/01 Another You (feat. Mr. Probz)" + } + /stream-m3u: + get: + summary: Returns m3u playlist file for the station's output stream + response: + '200': + description: The M3U file for the stream + content: application/x-mpegurl + /version: + get: + summary: Returns the current LibreTime and API versions + parameters: + - name: api_key + in: path + description: The API key to use for authentication + required: false + responses: + '200': + description: 200 response + content: + application/json: + example: { + "airtime_version": "3.0.0~alpha.5", + "api_version": "1.1" + } + /recorded-shows: + get: + summary: BROKEN - Unclear what this did, not implemented in ApiController + /calendar-init: + get: + summary: BROKEN - Unclear what this did, not implemented in ApiController + /upload-file: + get: + summary: BROKEN - Unclear what this did, not implemented in ApiController + /upload-recorded: + post: + summary: Upload a recorded show + parameters: + - name: showinstanceid + in: path + description: The ID of the show that was recorded + required: true + - name: fileid + in: path + description: The ID of the recorded file in the database + required: true + - name: api_key + in: path + description: The API key to use for authentication + required: true + /media-monitor-setup: + post: + summary: Initialises monitoring of media directories + parameters: + - name: api_key + in: path + description: The API key to use for authentication + required: true + /media-item-status: + get: + summary: BROKEN - Unclear what this did, not implemented in ApiController + parameters: + - name: api_key + in: path + description: The API key to use for authentication + required: true + /reload-metadata: + get: + summary: BROKEN - Unclear what this did, not implemented in ApiController + parameters: + - name: api_key + in: path + description: The API key to use for authentication + required: true + /list-all-files: + get: + summary: BROKEN - List all files in a given directory managed by LibreTime + parameters: + - name: dir_id + in: path + description: The directory to list files in + required: true + - name: all + in: path + description: |- + true to show all files in the database, even if they do not exist + on disk + required: false + - name: api_key + in: path + description: The API key to use for authentication + required: true + /list-all-watched-dirs: + get: + summary: |- + BROKEN (LT does not currently support watched files) - lists all + directories to watch for new files + parameters: + - name: api_key + in: path + description: The API key to use for authentication + required: true + /add-watched-dir: + post: + summary: |- + BROKEN (LT does not currently support watched files) - adds a directory + to the list of watched directories + parameters: + - name: path + in: path + description: the path of the directory on the server, base64 encoded + required: true + - name: api_key + in: path + description: The API key to use for authentication + required: true + /remove-watched-dir: + post: + summary: |- + BROKEN (LT does not currently support watched files) - removes a + directory from the list of watched directories + parameters: + - name: path + in: path + description: the path of the directory on the server, base64 encoded + required: true + - name: api_key + in: path + description: The API key to use for authentication + required: true + /set-storage-dir: + post: + summary: Sets the storage path for music files + parameters: + - name: path + in: path + description: The base64 encoded path to the new storage directory + required: true + - name: api_key + in: path + description: The API key to use for authentication + required: true + /get-stream-setting: + get: + summary: |- + BROKEN - Returns the settings configured for the four output Icecast + streams + parameters: + - name: api_key + in: path + description: The API key to use for authentication + required: true + /status: + get: + summary: |- + BROKEN - Returns the current status of the various LibreTime + components + parameters: + - name: api_key + in: path + description: The API key to use for authentication + required: true + /register-component: + post: + summary: Add a service component (for example Monit) + parameters: + - name: component + in: path + description: The component name to add + required: true + - name: api_key + in: path + description: The API key to use for authentication + required: true + /update-liquidsoap-status: + post: + summary: |- + Update the status of a stream to indicate a Liquidsoap status update + parameters: + - name: msg_post + in: path + description: The error message to use + required: true + - name: stream_id + in: path + description: The ID of the stream to update + required: true + - name: boot_time + description: |- + The time that the status was last updated. Excluding this will + force update. + required: false + - name: api_key + in: path + description: The API key to use for authentication + required: true + /update-file-system-mount: + post: + summary: |- + Handles additions/deletions of mount points on which watched + directories reside + parameters: + - name: added_dir + in: path + description: |- + A comma separated list of directories that were added to the system + required: false + - name: removed_dir + in: path + description: |- + A comma separated list of directories that were removed from the + system + required: false + - name: api_key + in: path + description: The API key to use for authentication + required: true + /handle-watched-dir-missing: + post: + summary: |- + BROKEN (LibreTime does not currentl handle watched directories) - + Handles missing watched directories. + parameters: + - name: dir + in: path + description: The directory to disable + required: true + - name: api_key + in: path + description: The API key to use for authentication + required: true + /rabbitmq-do-push: + post: + summary: |- + Used by dev scripts to make rabbitmq send out a message to pypo that a + potential change has been made to the database. + parameters: + - name: api_key + in: path + description: The API key to use for authentication + required: true + /check-live-stream-auth: + get: + summary: |- + Tests the authentication supplied to authenticate DJs connecting to a + live stream + parameters: + - name: api_key + in: path + description: The API key to use for authentication + required: true + requestBody: + required: true + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + username: + type: string + password: + type: string + format: password + djtype: + type: string + required: + - username + - password + - djtype + /update-source-status: + post: + summary: Update on source connect or disconnect + parameters: + - name: sourcename + in: path + description: |- + The name of the source that has connected or disconnected + - name: status + in: path + description: true if the source is now connected + - name: api_key + in: path + description: The API key to use for authentication + required: true + /get-bootstrap-info: + get: + summary: |- + BROKEN - Retrieves the current state of the instance. This includes + which sources are currently connected, station name, etc + parameters: + - name: api_key + in: path + description: The API key to use for authentication + required: true + /get-files-without-replay-gain: + get: + summary: |- + BROKEN (returns all files) - Returns the files that do not have replay + gain set. + parameters: + - name: dir_id + in: path + description: The directory ID + - name: api_key + in: path + description: The API key to use for authentication + required: true + /get-files-without-silan-value: + get: + summary: Returns the files that have not been processed by silan + parameters: + - name: api_key + in: path + description: The API key to use for authentication + required: true + responses: + '200': + description: 200 response for default request + content: + application/json: + example: [ + { + "id": 9, + "fp": "/srv/airtime/stor/" + }, + { + "id": 12, + "fp": "/srv/airtime/stor/imported/1/Sam Smith Feat John Legend/The Official Uk Top 40 Singles Chart 03-22-2015/01 Sam Smith Feat John Legend - Lay Me Down.mp3" + }, + { + "id": 13, + "fp": "/srv/airtime/stor/imported/1/Mumford & Sons/Wilder Mind [ Deluxe Edition ]/01 - Tompkins Square Park.mp3" + }, + { + "id": 3, + "fp": "/srv/airtime/stor/imported/1/Bastille/All This Bad Blood/1-02 Things We Lost in the Fire.mp3" + }, + { + "id": 1, + "fp": "/srv/airtime/stor/imported/1/Armin van Buuren/Another You (feat. Mr. Probz)/01 Another You (feat. Mr. Probz).mp3" + }, + { + "id": 15, + "fp": "/srv/airtime/stor/imported/1/Harley Tate/Harley Tate - After the EMP 01 - After the EMP/Harley Tate - After the EMP 01 - After the EMP.mp3" + } + ] + /reload-metadata-group: + get: + summary: |- + Extracts all file metadata from the list of files + parameters: + - name: mdXXX + # This could be wrong - the function in ApiController is confusing... + in: path + description: |- + A json encoded hash with all the information related to the action. + the XXX represents at least 1 digit. Currently the mdXXX key has no + meaning. + - name: api_key + in: path + description: The API key to use for authentication + required: true + /notify-webstream-data: + post: + summary: Notifies webstreams of data being updated + parameters: + - name: data + in: path + description: |- + A json encoded hash with the data used to notify the webstream. This + includes keys such as 'title'. + required: true + - name: media_id + in: path + description: The ID of the media to show + required: true + - name: api_key + in: path + description: The API key to use for authentication + required: true + /get-stream-parameters: + get: + summary: BROKEN - Retrieves the parameters set for each stream + parameters: + - name: api_key + in: path + description: The API key to use for authentication + required: true + /push-stream-stats: + post: + summary: Updates the listener number statistics + parameters: + - name: data + in: path + description: A json encoded mapping of time to number of listeners + required: true + - name: api_key + in: path + description: The API key to use for authentication + required: true + /update-stream-setting-table: + post: + summary: Set stream settings + parameters: + - name: data + in: path + description: A json encoded array of key-value pairs to update + required: true + - name: api_key + in: path + description: The API key to use for authentication + required: true + /update-replay-gain-value: + post: + summary: Updates the replay gain values for media items + parameters: + - name: api_key + in: path + description: The API key to use for authentication + required: true + - name: data + description: A json encoded array of media ID and gain pairs + required: true + /update-cue-values-by-silan: + post: + summary: Updates the silan cue values for media items + parameters: + - name: api_key + in: path + description: The API key to use for authentication + required: true + - name: data + description: A json encoded array of media ID and cue pairs + required: true + /get-usability-hint: + get: + summary: Returns the usibility hint tool-tip for a UI item + parameters: + - name: api_key + in: path + description: The API key to use for authentication + required: true + - name: userPath + in: path + description: The URL path to the UI item + required: true + /poll-celery: + post: + summary: Polls celery for tasks + parameters: + - name: api_key + in: path + description: The API key to use for authentication + required: true + /recalculate-schedule: + post: + summary: Recalculates the schedule to remove gaps and update timing + parameters: + - name: api_key + in: path + description: The API key to use for authentication + required: true