DovaFM Documentation
WebsiteAdd Discord Bot
  • Welcome to the DovaFM Documentation!
  • DovaFM Stream
    • Embed Widgets
    • Public Pages
    • Radio & Playlist Streams
  • DovaFM API
    • Now Playing
    • Stations
      • General
      • Broadcasting
      • Song Requests
      • Service Control
      • History
      • HLS Streams
      • Listeners
      • Schedules
      • Media
      • Mount Points
      • Playlists
      • Podcasts
      • Queue
      • Remote Relays
      • SFTP Users
      • Streamers/DJs
      • Web Hooks
    • Administration
      • Custom Fields
      • Users
      • Relays
      • Roles
      • Settings
      • Stations
      • Storage Locations
      • CPU Status
    • Miscellaneous
      • Status
      • Time
  • DovaFM Discord Bot
    • Information
    • Commands
  • DovaFM Staff
    • Staff Members
Powered by GitBook
On this page
  1. DovaFM API
  2. Stations

Media

PreviousSchedulesNextMount Points

Last updated 7 months ago

get

Returns the album art for a song, or a generic image.

Path parameters
station_idany ofRequired
integer · int64Optional
or
string · stringOptional
media_idstringRequired

The station media unique ID

Responses
200
The requested album artwork
404
Image not found; generic filler image.
get
GET /api/station/{station_id}/art/{media_id} HTTP/1.1
Host: listen.dovafm.xyz
Accept: */*

No content

post

Sets the album art for a track.

Authorizations
Path parameters
station_idany ofRequired
integer · int64Optional
or
string · stringOptional
idany ofRequired

Media ID

integer · int64Optional
or
stringOptional
Responses
200
Success
application/json
403
Access denied.
application/json
404
Record not found.
application/json
500
A generic exception has occurred.
application/json
post
POST /api/station/{station_id}/art/{media_id} HTTP/1.1
Host: listen.dovafm.xyz
X-API-Key: YOUR_API_KEY
Accept: */*
{
  "success": true,
  "message": "Changes saved successfully.",
  "formatted_message": "<b>Changes saved successfully.</b>"
}
delete

Removes the album art for a track.

Authorizations
Path parameters
station_idany ofRequired
integer · int64Optional
or
string · stringOptional
idany ofRequired

Media ID

integer · int64Optional
or
stringOptional
Responses
200
Success
application/json
403
Access denied.
application/json
404
Record not found.
application/json
500
A generic exception has occurred.
application/json
delete
DELETE /api/station/{station_id}/art/{media_id} HTTP/1.1
Host: listen.dovafm.xyz
X-API-Key: YOUR_API_KEY
Accept: */*
{
  "success": true,
  "message": "Changes saved successfully.",
  "formatted_message": "<b>Changes saved successfully.</b>"
}
get

List all current uploaded files.

Authorizations
Path parameters
station_idany ofRequired
integer · int64Optional
or
string · stringOptional
Responses
200
Success
application/json
Responseall of[]
403
Access denied.
application/json
500
A generic exception has occurred.
application/json
get
GET /api/station/{station_id}/files HTTP/1.1
Host: listen.dovafm.xyz
X-API-Key: YOUR_API_KEY
Accept: */*
[
  {
    "text": "Chet Porter - Aluko River",
    "artist": "Chet Porter",
    "title": "Aluko River",
    "album": "Moving Castle",
    "genre": "Rock",
    "isrc": "US28E1600021",
    "lyrics": "",
    "links": {
      "ANY_ADDITIONAL_PROPERTY": "text"
    },
    "id": 1,
    "unique_id": "69b536afc7ebbf16457b8645",
    "song_id": "9f33bbc912c19603e51be8e0987d076b",
    "art": "https://picsum.photos/1200/1200",
    "path": "test.mp3",
    "mtime": 1609480800,
    "uploaded_at": 1609480800,
    "art_updated_at": 1609480800,
    "length": 240,
    "length_text": "4:00",
    "custom_fields": [
      "custom_field_value"
    ],
    "extra_metadata": [],
    "playlists": []
  }
]
get

Retrieve details for a single file.

Authorizations
Path parameters
station_idany ofRequired
integer · int64Optional
or
string · stringOptional
idinteger · int64Required

Media ID

Responses
200
Success
application/json
Responseall of
403
Access denied.
application/json
404
Record not found.
application/json
500
A generic exception has occurred.
application/json
get
GET /api/station/{station_id}/file/{id} HTTP/1.1
Host: listen.dovafm.xyz
X-API-Key: YOUR_API_KEY
Accept: */*
{
  "text": "Chet Porter - Aluko River",
  "artist": "Chet Porter",
  "title": "Aluko River",
  "album": "Moving Castle",
  "genre": "Rock",
  "isrc": "US28E1600021",
  "lyrics": "",
  "links": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "id": 1,
  "unique_id": "69b536afc7ebbf16457b8645",
  "song_id": "9f33bbc912c19603e51be8e0987d076b",
  "art": "https://picsum.photos/1200/1200",
  "path": "test.mp3",
  "mtime": 1609480800,
  "uploaded_at": 1609480800,
  "art_updated_at": 1609480800,
  "length": 240,
  "length_text": "4:00",
  "custom_fields": [
    "custom_field_value"
  ],
  "extra_metadata": [],
  "playlists": []
}
delete

Delete a single file.

Authorizations
Path parameters
station_idany ofRequired
integer · int64Optional
or
string · stringOptional
idinteger · int64Required

Media ID

Responses
200
Success
application/json
403
Access denied.
application/json
404
Record not found.
application/json
500
A generic exception has occurred.
application/json
delete
DELETE /api/station/{station_id}/file/{id} HTTP/1.1
Host: listen.dovafm.xyz
X-API-Key: YOUR_API_KEY
Accept: */*
{
  "success": true,
  "message": "Changes saved successfully.",
  "formatted_message": "<b>Changes saved successfully.</b>"
}
  • GET/station/{station_id}/art/{media_id}
  • POST/station/{station_id}/art/{media_id}
  • DELETE/station/{station_id}/art/{media_id}
  • GET/station/{station_id}/files
  • POST/station/{station_id}/files
  • GET/station/{station_id}/file/{id}
  • PUT/station/{station_id}/file/{id}
  • DELETE/station/{station_id}/file/{id}
post

Upload a new file.

Authorizations
Path parameters
station_idany ofRequired
integer · int64Optional
or
string · stringOptional
Body
pathstringOptional

The destination path of the uploaded file.

Example: relative/path/to/file.mp3
filestringOptional

The base64-encoded contents of the file to upload.

Responses
200
Success
application/json
Responseall of
403
Access denied.
application/json
500
A generic exception has occurred.
application/json
post
POST /api/station/{station_id}/files HTTP/1.1
Host: listen.dovafm.xyz
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 46

{
  "path": "relative/path/to/file.mp3",
  "file": ""
}
{
  "text": "Chet Porter - Aluko River",
  "artist": "Chet Porter",
  "title": "Aluko River",
  "album": "Moving Castle",
  "genre": "Rock",
  "isrc": "US28E1600021",
  "lyrics": "",
  "links": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "id": 1,
  "unique_id": "69b536afc7ebbf16457b8645",
  "song_id": "9f33bbc912c19603e51be8e0987d076b",
  "art": "https://picsum.photos/1200/1200",
  "path": "test.mp3",
  "mtime": 1609480800,
  "uploaded_at": 1609480800,
  "art_updated_at": 1609480800,
  "length": 240,
  "length_text": "4:00",
  "custom_fields": [
    "custom_field_value"
  ],
  "extra_metadata": [],
  "playlists": []
}
put

Update details of a single file.

Authorizations
Path parameters
station_idany ofRequired
integer · int64Optional
or
string · stringOptional
idinteger · int64Required

Media ID

Body
all ofOptional
Responses
200
Success
application/json
403
Access denied.
application/json
404
Record not found.
application/json
500
A generic exception has occurred.
application/json
put
PUT /api/station/{station_id}/file/{id} HTTP/1.1
Host: listen.dovafm.xyz
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 526

{
  "text": "Chet Porter - Aluko River",
  "artist": "Chet Porter",
  "title": "Aluko River",
  "album": "Moving Castle",
  "genre": "Rock",
  "isrc": "US28E1600021",
  "lyrics": "",
  "links": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "id": 1,
  "unique_id": "69b536afc7ebbf16457b8645",
  "song_id": "9f33bbc912c19603e51be8e0987d076b",
  "art": "https://picsum.photos/1200/1200",
  "path": "test.mp3",
  "mtime": 1609480800,
  "uploaded_at": 1609480800,
  "art_updated_at": 1609480800,
  "length": 240,
  "length_text": "4:00",
  "custom_fields": [
    "custom_field_value"
  ],
  "extra_metadata": [],
  "playlists": []
}
{
  "success": true,
  "message": "Changes saved successfully.",
  "formatted_message": "<b>Changes saved successfully.</b>"
}