Endpoints for retrieving, searching and managing radios.
Use this endpoint to list all radios.
GET /radios
Name | Type | Description |
---|---|---|
page | Integer | Page number (default 1) |
page_size | Integer | Result number per page (default 20, max 1000) |
GET /radios?key=...&page_size=1
For a valid query
Status: 200 OK
For an invalid query
Status: 400 Bad Request
Use this endpoint to retrieve a specifi radio.
GET /radios/{radio_id}
GET /radios/563b9cb15fb5b184008b4604?key=...
For a valid radio id
Status: 200 OK
For an invalid radio id
Status: 404 Not Found
Use this endpoint to create a new radio based on tracks and/or tags and/or user.
POST /radios
Name | Type | Description |
---|---|---|
seeds | Array | Array of Niland Track IDs |
tags | Array | Array of Tag IDs |
user | String | User Reference |
discovery_rate | Integer | Percentage of track discovery (between 0 and 100, default 70) |
For a valid query
Status: 201 Created OR 200 OK if a radio already exists with those parameters
For an invalid query
Status: 400 Bad Request
Use this endpoint to edit a radio.
PATCH /radios/{radio_id}
Name | Type | Description |
---|---|---|
seeds | Array | Array of Niland Track IDs |
tags | Array | Array of Tag IDs |
user | String | User external ID |
discovery_rate | Integer | Percentage of track discovery (between 0 and 100, default 70) |
PATCH /radios/56420e1ff799b98527f3109d
For a valid query
Status: 200 OK
For an invalid query
Status: 400 Bad Request
Use this endpoint to delete a radio.
DELETE /radios/{radio_id}
For a valid radio id
Status: 204 No Content
For an invalid radio id
Status: 404 Not Found
Use this endpoint to retrieve the next tracks to play.
GET /radios/{radio_id}/next
For a valid radio id which is not yet prepared
This means that the radio is not ready yet. You have to follow the redirect until you get a 200 status.
Status: 302 Redirect
For a valid radio id
Status: 200 OK
For an invalid radio id
Status: 404 Not Found
In order to get better results, you should tell us when a user skips a track.
POST /radios/{radio_id}/skips
Notice: One parameter only is required.
Name | Type | Description |
---|---|---|
track | Integer | Niland Track ID |
reference | String | Track Reference |
POST /radios/56420e1ff799b98527f3109d/skips
For a valid query
Status: 201 Created
For an invalid query
Status: 400 Bad Request
For an invalid radio id
Status: 404 Not Found
In order to get better results, you should tell us when a user likes a track.
POST /radios/{radio_id}/likes
Notice: One parameter only is required.
Name | Type | Description |
---|---|---|
track | Integer | Niland Track ID |
reference | String | Track Reference |
POST /radios/56420e1ff799b98527f3109d/likes
For a valid query
Status: 201 Created
For an invalid query
Status: 400 Bad Request
For an invalid radio id
Status: 404 Not Found
In order to get better results, you should tell us when a user dislikes a track.
POST /radios/{radio_id}/dislikes
Notice: One parameter only is required.
Name | Type | Description |
---|---|---|
track | Integer | Niland Track ID |
reference | String | Track Reference |
POST /radios/56420e1ff799b98527f3109d/dislikes
For a valid query
Status: 201 Created
For an invalid query
Status: 400 Bad Request
For an invalid radio id
Status: 404 Not Found
In order to get better results, you should tell us when a user bans a track.
POST /radios/{radio_id}/bans
Notice: One parameter only is required.
Name | Type | Description |
---|---|---|
track | Integer | Niland Track ID |
reference | String | Track Reference |
POST /radios/56420e1ff799b98527f3109d/bans
For a valid query
Status: 201 Created
For an invalid query
Status: 400 Bad Request
For an invalid radio id
Status: 404 Not Found
In order to get better results, you should tell us when a user add a track to his favorites.
POST /radios/{radio_id}/favorites
Notice: One parameter only is required.
Name | Type | Description |
---|---|---|
track | Integer | Niland Track ID |
reference | String | Track Reference |
POST /radios/56420e1ff799b98527f3109d/favorites
For a valid query
Status: 201 Created
For an invalid query
Status: 400 Bad Request
For an invalid radio id
Status: 404 Not Found
In order to get better results, you should tell us when a user has not played a track before get the next tracks.
POST /radios/{radio_id}/notplayeds
Notice: One parameter only is required.
Name | Type | Description |
---|---|---|
track | Integer | Niland Track ID |
reference | String | Track Reference |
POST /radios/56420e1ff799b98527f3109d/notplayeds
For a valid query
Status: 201 Created
For an invalid query
Status: 400 Bad Request
For an invalid radio id
Status: 404 Not Found