BRG API Docs

All endpoints will return a JSON response with the following format.
If the "status" field is set to "error" an error message will be provided in the "message" field.
If an action has a response message that should be printed to a user it will also be provided in the "message" field.
If the response is paginated the number of pages will be provided in the "pages" field.
{
  "status": "success"|"error",
  "message": "string"|null,
  "result": object|array|string|null,
  "pages": int|null
}
								

GET
Streaminfo

/api/streaminfo/{mountpoint}
Stream Mountpoint
Haupt Stream stream
Mobile Stream mobile
Opus Stream opus
NightDJ nightdj
DayDJ daydj
{
  "status": "success",
  "message": null,
  "result": {
    "id": 1,
    "track_id": 1234,
    "title": "Summer Mashup (DJ Mix)",
    "artist": "John Kenza",
    "listener": 27,
    "status": "Online",
    "current_event": "DJ-Pony Lucy",
    "upvotes": 0,
    "downvotes": 0
  },
  "pages": null
}
						

GET
Track List

/api/track/list
The following parameters can be provided to filter the response.
Parameter Value
title Title of a song
artist Artist of a song
{
  "status": "success",
  "message": null,
  "result": [
    {
      "id": 1,
      "title": "Magic Dance (w/ AgileDash)",
      "artist": "&I"
    },
    {
      "id": 2,
      "title": "Canterlot Disco",
      "artist": "&I"
    },
    ...
  ],
  "pages": null
}
						

GET
Track List AutoDJ

/api/track/list/autodj
The following parameters can be provided to filter the response.
Parameter Value
title Title of a song
artist Artist of a song
{
  "status": "success",
  "message": null,
  "result": [
    {
      "id": 1,
      "title": "Magic Dance (w/ AgileDash)",
      "artist": "&I"
    },
    {
      "id": 2,
      "title": "Canterlot Disco",
      "artist": "&I"
    },
    ...
  ],
  "pages": null
}
						

GET
Track

/api/track/{id}
{
  "status": "success",
  "message": null,
  "result": {
    "id": 1,
    "title": "Magic Dance (w/ AgileDash)",
    "artist": "&I"
  },
  "pages": null
}
						

GET
Track AutoDJ

/api/track/autodj/{id}
{
  "status": "success",
  "message": null,
  "result": {
    "id": 1,
    "title": "Magic Dance (w/ AgileDash)",
    "artist": "&I"
  },
  "pages": null
}
						

GET
System Status

/api/status/{id}
System ID
System Status 1
Message System Aktiv 2
AutoDj Request 3
{
  "status": "success",
  "message": null,
  "result": {
    "id": 1,
    "active": false,
    "limit": 1,
    "description": "Request System"
  },
  "pages": null
}
						

GET
History

/api/history[/{page}]
The following parameters can be provided to filter the response.
Parameter Value
date_played_start YYYY-MM-DD
date_played_end YYYY-MM-DD
time_played_start hh:mm:ss
time_played_end hh:mm:ss
title Title of a song
artist Artist of a song
{
  "status": "success",
  "message": null,
  "result": [
    {
      "history_id": 436429,
      "date_played": "2018-07-09",
      "time_played": "14:14:13",
      "artist": "Foozogz",
      "title": "Sparkle (Season Rebirth)"
    },
    {
      "history_id": 436409,
      "date_played": "2018-07-09",
      "time_played": "14:10:37",
      "artist": "Glaze",
      "title": "Our Terrarium (µThunder Remix)"
    },
  ],
  "pages": 21822
}
						

GET
Donations

/api/donation/list
{
  "status": "success",
  "message": null,
  "result": [
    {
      "id": 132,
      "name": "Anonym",
      "amount": "25.00"
    },
    {
      "id": 133,
      "name": "Anonym",
      "amount": "5.00"
    },
    ...
  ],
  "pages": null
}
						

GET
Donation amount needed

/api/donation/currently-needed-amount
{
  "status": "success",
  "message": null,
  "result": "100.99",
  "pages": null
}
						

GET
Community user coins

/api/community/user/coin/{discordUserId}
{
  "status": "success",
  "message": null,
  "result": {
    "discord_username": "Username#1337",
    "discord_user_id": "123456789123456789",
    "coins": "1337"
  },
  "pages": null
}
						

GET
Voted for song on mountpoint

/api/vote/check/{voterId}/{mountpoint}
Stream Mountpoint
Haupt Stream stream
Mobile Stream mobile
Opus Stream opus
NightDJ nightdj
DayDJ daydj
{
  "status": "success",
  "message": null,
  "result": {
    "voted": true|false,
    "direction": "up"|"down"|""
  },
  "pages": null
}
						

POST
Message

/api/message
The following parameters have to be provided.
Parameter Value
nickname Your nickname that will be shown to the DJ
message The message you want to send to the DJ
{
  "status": "success",
  "message": "Nachricht eingereicht",
  "result": null,
  "pages": null
}
						

POST
Request

/api/request
The live request system supports requests with title and artist as well as requests by track IDs.
The following parameters are used for title and artist requests.
Parameter Value Required
title Title of a song done
artist Artist of a song done
url Link to the song
nickname Your nickname that will be shown to the DJ
message The message you want to send to the DJ
The following parameters are used for track ID requests.
Parameter Value Required
id ID of a track done
nickname Your nickname that will be shown to the DJ
message The message you want to send to the DJ
{
  "status": "success",
  "message": "Request eingereicht",
  "result": null,
  "pages": null
}
						

POST
AutoDJ Request

/api/request/autodj
The following parameters are used for AutoDJ requests.
Parameter Value Required
id ID of a track done
nickname Your nickname that will be used for statistics and rate limiting
{
  "status": "success",
  "message": "Request eingereicht",
  "result": null,
  "pages": null
}
						

POST
Voter

/api/voter
This endpoint is restricted by CORS. If you want to implement the voting functionality on your website please contact us.
{
  "status": "success",
  "message": null,
  "result": {
    "voter_id": "cb786c0f-c08e-4594-b404-526c1b519a56"
  },
  "pages": null
}
						

POST
Vote

/api/vote/{mountpoint}
This endpoint is restricted by CORS. If you want to implement the voting functionality on your website please contact us.
Stream Mountpoint
Haupt Stream stream
Mobile Stream mobile
Opus Stream opus
NightDJ nightdj
DayDJ daydj
The following parameters have to be provided.
Parameter Value
voter_id VoterID obtained from the voter endpoint
direction up, down
{
  "status": "success",
  "message": null,
  "result": null,
  "pages": null
}