SoundTouch REST Media Server API documentation version 0.1.0
http://localhost:3000/
Welcome to the SoundTouch REST Media Server API Documentation.
The API is a RESTful (Representational State Transfer) implementation that tries to adhere to level 3 of the REST API maturity model using HAL (Hypertext Application Language).
So what does that waffle mean?
Standard HTTP methods
Well basically we are using standard HTTP methods - POST, GET, PUT/PATCH, DELETE - to perform CRUD (Cread, Read, Update, Delete) operations on our data. We also make use of standard HTTP status codes to report operation success or errors. Using standard HTTP methods allows clients to take advantage of established caching techniques using ETags, Last-Modified, etc..
Stateless
We don't store any state on the server - no operation is dependant on the result of a previous one.
Discoverability
The level 3 bit means we are also building in discoverability into our API through links. We are doing that using the template defined by HAL. The HAL spec at it's basic level includes "_link" and "_embedded" properties as part of each response to enclose the links related to the current resource and also any embedded resources we may choose to include.
For example;
{
"_links": {
"self": {
"href": "http://localhost:3000/v1/artists/964"
},
"albums": {
"href": "http://localhost:3000/v1/artist/964/albums"
},
"tracks": {
"href": "http://localhost:3000/v1/artist/964/tracks"
}
},
"id": "964",
"name": "Death Cab for Cutie",
"albumCount": 1,
"_embedded": {
"albums": [
{
"_links": {
"self": {
"href": "http://localhost:3000/v1/albums/934"
}
},
"id": "934",
"name": "Kintsugi"
}
]
}
}
If you're interested the HAL specification and the HAL primer are good resources to read.
In theory this should remove the need for hardcoded API URL links in the client, you ony need to know the relation name.
Responses
All collections and resources are represented in JSON format, no XML here.
All collections support pagination using &page and &pageSize URL parameters.
/
It all starts here folks, come on in
Returns the available operations on this resource
The root of the API. Provides links to the collections endpoints you can explore.
get /
The root of the API. Provides links to the collections endpoints you can explore.
HTTP status code 200
Body
Type: application/json
Example:
{
"_links": {
"self": {
"href": "http://localhost:3000"
},
"albums": {
"href": "http://localhost:3000/albums?page=1"
},
"artists": {
"href": "http://localhost:3000/artists?page=1"
},
"tracks": {
"href": "http://localhost:3000/tracks?page=1"
},
"playlists": {
"href": "http://localhost:3000/playlists?page=1"
},
"search-albums": {
"href": "http://localhost:3000/search/albums"
},
"search-artists": {
"href": "http://localhost:3000/search/artists"
},
"search-tracks": {
"href": "http://localhost:3000/search/tracks"
}
}
}Albums
Everything to do with albums
Returns the available operations on this resource
Returns a paginated collection of albums
get /albums
Returns a paginated collection of albums
Query Parameters
- response: (one of lite, standard, full - default: standard)
Provides the option to tailor the verbosity of the response information. If not specified the default is standard.
- pageSize: (number - default: 50)
The number of items per page
- page: (number - default: 0)
The page number to return
- compilation: (boolean - default: false)
Use true to return only compilation albums
HTTP status code 200
albums schema and albums sample data included
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"_links": {
"type": "object",
"properties": {
"self": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
}
},
"required": [
"self"
]
},
"count": {
"type": "integer"
},
"total": {
"type": "integer"
},
"_embedded": {
"type": "object",
"properties": {
"albums": {
"type": "array",
"items": {
"$ref": "http://localhost:3000/v1/schemas/album.json"
}
}
},
"additionalProperties": false,
"required": [
"albums"
]
}
},
"additionalProperties": false,
"required": [
"_links",
"count",
"total",
"_embedded"
]
}Example:
{
"_links": {
"self": {
"href": "http://localhost:3000/albums"
},
"next": {
"href": "http://localhost:3000/albums?page=2"
},
"last": {
"href": "http://localhost:3000/albums?page=100"
}
},
"count": 2,
"total": 10,
"_embedded": {
"albums": [
{
"_links": {
"self": {
"href": "http://localhost:3000/albums/100"
},
"tracks": {
"href": "http://localhost:3000/albums/100/tracks"
},
"artist": {
"href": "http://localhost:3000/artists/934"
},
"image": {
"href": "http://localhost:3000/albums/100/image"
}
},
"id": 100,
"name": "Kintsugi",
"compilation": false,
"imageURL": "http://localhost:3000/albums/100/image",
"_embedded": {
"artist": {
"_links": {
"self": {
"href": "http://localhost:3000/artists/934"
},
"albums": {
"href": "http://localhost:3000/artists/934/albums"
},
"tracks": {
"href": "http://localhost:3000/artists/934/tracks"
}
},
"id": 934,
"name": "Death Cab for Cutie"
},
"composer": {
"_links": {
"self": {
"href": "http://localhost:3000/artists/934"
},
"albums": {
"href": "http://localhost:3000/artists/934/albums"
},
"tracks": {
"href": "http://localhost:3000/artists/934/tracks"
}
},
"id": 934,
"name": "Death Cab for Cutie"
}
}
},
{
"_links": {
"self": {
"href": "http://localhost:3000/albums/4321"
},
"tracks": {
"href": "http://localhost:3000/albums/4321/tracks"
},
"artist": {
"href": "http://localhost:3000/artists/9874"
},
"image": {
"href": "http://localhost:3000/album/101/image"
}
},
"id": 101,
"name": "No Deal",
"compilation": false,
"imageURL": "http://localhost:3000/albums/101/image",
"_embedded": {
"artist": {
"_links": {
"self": {
"href": "http://localhost:3000/artists/934"
},
"albums": {
"href": "http://localhost:3000/artists/934/albums"
},
"tracks": {
"href": "http://localhost:3000/artists/934/tracks"
}
},
"id": 9874,
"name": "Melanie De Biasio"
},
"composer": {
"_links": {
"self": {
"href": "http://localhost:3000/artists/934"
},
"albums": {
"href": "http://localhost:3000/artists/934/albums"
},
"tracks": {
"href": "http://localhost:3000/artists/934/tracks"
}
},
"id": 934,
"name": "Death Cab for Cutie"
}
}
}
]
}
}HTTP status code 400
Bad request
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
},
"description": {
"type": "string"
},
"debug": {
"type": "object"
}
},
"additionalProperties": false,
"required": [
"code",
"message",
"description"
]
}
},
"additionalProperties": false,
"required": [
"error"
]
}Example:
{
"error": {
"code": 1301,
"message": "Some headline error message",
"description": "A more detailed description of the error"
}
}
Respresentation of a album resource
Returns the available operations on this resource
Returns the album with the given id
get /albums/{id}
Returns the album with the given id
URI Parameters
- id: required (string)
album identifier
Query Parameters
- response: (one of lite, standard, full - default: standard)
Provides the option to tailor the verbosity of the response information. If not specified the default is standard.
HTTP status code 200
album schema and album sample data included
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"_links": {
"type": "object",
"properties": {
"self": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
},
"tracks": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
},
"artist": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
},
"image": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
}
},
"required": [
"self",
"tracks",
"artist",
"image"
]
},
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"compilation": {
"type": "boolean"
},
"imageURL": {
"type": "string"
},
"_embedded": {
"type": "object",
"properties": {
"artist": {
"type": "object",
"$ref": "http://localhost:3000/v1/schemas/artist.json"
}
},
"additionalProperties": false,
"required": [
"artist"
]
}
},
"additionalProperties": false,
"required": [
"_links",
"id",
"name",
"compilation",
"imageURL",
"_embedded"
]
}Example:
{
"_links": {
"self": {
"href": "http://localhost:3000/albums/934"
},
"tracks": {
"href": "http://localhost:3000/albums/964/tracks"
},
"artist": {
"href": "http://localhost:3000/artists/5435"
},
"image": {
"href": "http://localhost:3000/albums/934/image"
}
},
"id": 934,
"name": "Kintsugi",
"duration": 2700,
"trackCount": 11,
"genre": "Indie Rock",
"releaseDate": "2015",
"compilation": false,
"imageURL": "http://localhost:3000/albums/934/image",
"_embedded": {
"artist": {
"_links": {
"self": {
"href": "http://localhost:3000/artists/934"
},
"albums": {
"href": "http://localhost:3000/artists/934/albums"
},
"tracks": {
"href": "http://localhost:3000/artists/934/tracks"
}
},
"id": 934,
"name": "Death Cab for Cutie"
},
"composer": {
"_links": {
"self": {
"href": "http://localhost:3000/artists/934"
},
"albums": {
"href": "http://localhost:3000/artists/934/albums"
},
"tracks": {
"href": "http://localhost:3000/artists/934/tracks"
}
},
"id": 934,
"name": "Death Cab for Cutie"
}
}
}HTTP status code 404
Resource not found
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
},
"description": {
"type": "string"
},
"debug": {
"type": "object"
}
},
"additionalProperties": false,
"required": [
"code",
"message",
"description"
]
}
},
"additionalProperties": false,
"required": [
"error"
]
}Example:
{
"error": {
"code": 1301,
"message": "Some headline error message",
"description": "A more detailed description of the error"
}
}
Everything to do with tracks
Returns the available operations on this resource
Returns a paginated collection of tracks
get /albums/{id}/tracks
Returns a paginated collection of tracks
URI Parameters
- id: required (string)
album identifier
Query Parameters
- response: (one of lite, standard, full - default: standard)
Provides the option to tailor the verbosity of the response information. If not specified the default is standard.
- pageSize: (number - default: 50)
The number of items per page
- page: (number - default: 0)
The page number to return
- artist: (number - default: The album artist)
See only tracks in the album by the specified artist. Used to get specific artist tracks on a compilation
- composer: (number)
See only tracks in the album by the specified composer.
- genre: (number)
See only tracks in the album of the specified genre.
HTTP status code 200
tracks schema and tracks sample data included
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"_links": {
"type": "object",
"properties": {
"self": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
}
},
"required": [
"self"
]
},
"count": {
"type": "integer"
},
"total": {
"type": "integer"
},
"_embedded": {
"type": "object",
"properties": {
"tracks": {
"type": "array",
"items": {
"$ref": "http://localhost:3000/v1/schemas/track.json"
}
}
},
"additionalProperties": false,
"required": [
"tracks"
]
}
},
"additionalProperties": false,
"required": [
"_links",
"count",
"total",
"_embedded"
]
}Example:
{
"_links": {
"self": {
"href": "http://localhost:3000/albums/934/tracks"
},
"next": {
"href": "http://localhost:3000/albums/934/tracks?page=2"
},
"last": {
"href": "http://localhost:3000/albums/934/tracks?page=100"
}
},
"count": 2,
"total": 100,
"_embedded": {
"tracks": [
{
"_links": {
"self": {
"href": "http://localhost:3000/tracks/602"
},
"album": {
"href": "http://localhost:3000/albums/964"
},
"artist": {
"href": "http://localhost:3000/artists/5435"
},
"stream": {
"href": "http://localhost:3000/tracks/602/stream"
}
},
"id": 602,
"name": "Black Sun",
"duration": 180,
"trackNumber": 2
},
{
"_links": {
"self": {
"href": "http://localhost:3000/tracks/603"
},
"album": {
"href": "http://localhost:3000/albums/964"
},
"artist": {
"href": "http://localhost:3000/artists/5435"
},
"stream": {
"href": "http://localhost:3000/tracks/602/stream"
}
},
"id": 603,
"name": "The Ghosts Of Beverly Drive",
"duration": 240,
"trackNumber": 3
}
]
}
}HTTP status code 400
Bad request
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
},
"description": {
"type": "string"
},
"debug": {
"type": "object"
}
},
"additionalProperties": false,
"required": [
"code",
"message",
"description"
]
}
},
"additionalProperties": false,
"required": [
"error"
]
}Example:
{
"error": {
"code": 1301,
"message": "Some headline error message",
"description": "A more detailed description of the error"
}
}
Returns the album artwork, optionally dynamically resized depending on the query params passed If only one dimension parameter is given the image will be resized maintain original proportions. NOTE: If you give values that would change the proportions of the image by specifying both params you will get back a squashed or stretched image
get /albums/{id}/image
Returns the album artwork, optionally dynamically resized depending on the query params passed If only one dimension parameter is given the image will be resized maintain original proportions. NOTE: If you give values that would change the proportions of the image by specifying both params you will get back a squashed or stretched image
URI Parameters
- id: required (string)
album identifier
Query Parameters
- w: (number - default: Original image width)
The desired image width
- h: (number - default: Orginal image height)
The desired image height
HTTP status code 200
Body
Type: image/png
HTTP status code 404
Resource not found
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
},
"description": {
"type": "string"
},
"debug": {
"type": "object"
}
},
"additionalProperties": false,
"required": [
"code",
"message",
"description"
]
}
},
"additionalProperties": false,
"required": [
"error"
]
}Example:
{
"error": {
"code": 1301,
"message": "Some headline error message",
"description": "A more detailed description of the error"
}
}
Artists
Everything to do with artists
Returns the available operations on this resource
Returns a paginated collection of artists
get /artists
Returns a paginated collection of artists
Query Parameters
- response: (one of lite, standard, full - default: standard)
Provides the option to tailor the verbosity of the response information. If not specified the default is standard.
- pageSize: (number - default: 50)
The number of items per page
- page: (number - default: 0)
The page number to return
HTTP status code 200
artists schema and artists sample data included
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"_links": {
"type": "object",
"properties": {
"self": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
}
},
"required": [
"self"
]
},
"count": {
"type": "integer"
},
"total": {
"type": "integer"
},
"_embedded": {
"type": "object",
"properties": {
"artists": {
"type": "array",
"items": {
"$ref": "http://localhost:3000/v1/schemas/artist.json"
}
}
},
"additionalProperties": false,
"required": [
"artists"
]
}
},
"additionalProperties": false,
"required": [
"_links",
"count",
"total",
"_embedded"
]
}Example:
{
"_links": {
"self": {
"href": "http://localhost:3000/artists"
},
"next": {
"href": "http://localhost:3000/artists?page=2"
},
"last": {
"href": "http://localhost:3000/artists?page=100"
}
},
"count": 2,
"total": 10,
"_embedded": {
"artists": [
{
"_links": {
"self": {
"href": "http://localhost:3000/artists/964"
},
"albums": {
"href": "http://localhost:3000/artists/964/albums"
},
"tracks": {
"href": "http://localhost:3000/artists/964/tracks"
}
},
"id": 964,
"name": "Death Cab for Cutie"
},
{
"_links": {
"self": {
"href": "http://localhost:3000/artists/964"
},
"albums": {
"href": "http://localhost:3000/artists/964/albums"
},
"tracks": {
"href": "http://localhost:3000/artists/964/tracks"
}
},
"id": 964,
"name": "Death Cab for Cutie"
}
]
}
}HTTP status code 400
Bad request
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
},
"description": {
"type": "string"
},
"debug": {
"type": "object"
}
},
"additionalProperties": false,
"required": [
"code",
"message",
"description"
]
}
},
"additionalProperties": false,
"required": [
"error"
]
}Example:
{
"error": {
"code": 1301,
"message": "Some headline error message",
"description": "A more detailed description of the error"
}
}
Respresentation of a artist resource
Returns the available operations on this resource
Returns the artist with the given id
get /artists/{id}
Returns the artist with the given id
URI Parameters
- id: required (string)
artist identifier
Query Parameters
- response: (one of lite, standard, full - default: standard)
Provides the option to tailor the verbosity of the response information. If not specified the default is standard.
HTTP status code 200
artist schema and artist sample data included
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"_links": {
"type": "object",
"properties": {
"self": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
},
"albums": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
},
"tracks": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
}
},
"required": [
"self",
"albums",
"tracks"
]
},
"id": {
"type": "integer"
},
"name": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"_links",
"id",
"name"
]
}Example:
{
"_links": {
"self": {
"href": "http://localhost:3000/artists/964"
},
"albums": {
"href": "http://localhost:3000/artists/964/albums"
},
"tracks": {
"href": "http://localhost:3000/artists/964/tracks"
}
},
"id": 964,
"name": "Death Cab for Cutie",
"albumCount": 5
}HTTP status code 404
Resource not found
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
},
"description": {
"type": "string"
},
"debug": {
"type": "object"
}
},
"additionalProperties": false,
"required": [
"code",
"message",
"description"
]
}
},
"additionalProperties": false,
"required": [
"error"
]
}Example:
{
"error": {
"code": 1301,
"message": "Some headline error message",
"description": "A more detailed description of the error"
}
}
Everything to do with albums
Returns the available operations on this resource
Returns a paginated collection of albums
get /artists/{id}/albums
Returns a paginated collection of albums
URI Parameters
- id: required (string)
artist identifier
Query Parameters
- response: (one of lite, standard, full - default: standard)
Provides the option to tailor the verbosity of the response information. If not specified the default is standard.
- pageSize: (number - default: 50)
The number of items per page
- page: (number - default: 0)
The page number to return
HTTP status code 200
albums schema and albums sample data included
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"_links": {
"type": "object",
"properties": {
"self": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
}
},
"required": [
"self"
]
},
"count": {
"type": "integer"
},
"total": {
"type": "integer"
},
"_embedded": {
"type": "object",
"properties": {
"albums": {
"type": "array",
"items": {
"$ref": "http://localhost:3000/v1/schemas/album.json"
}
}
},
"additionalProperties": false,
"required": [
"albums"
]
}
},
"additionalProperties": false,
"required": [
"_links",
"count",
"total",
"_embedded"
]
}Example:
{
"_links": {
"self": {
"href": "http://localhost:3000/artists/964/albums"
},
"next": {
"href": "http://localhost:3000/artists/964/albums?page=2"
},
"last": {
"href": "http://localhost:3000/artists/964/albums?page=100"
}
},
"count": 2,
"total": 10,
"_embedded": {
"albums": [
{
"_links": {
"self": {
"href": "http://localhost:3000/albums/934"
},
"tracks": {
"href": "http://localhost:3000/albums/934/tracks"
},
"artist": {
"href": "http://localhost:3000/artists/934"
},
"image": {
"href": "http://localhost:3000/albums/100/image"
}
},
"id": 100,
"name": "Kintsugi",
"compilation": false,
"imageURL": "http://localhost:3000/albums/100/image",
"_embedded": {
"artist": {
"_links": {
"self": {
"href": "http://localhost:3000/artists/934"
},
"albums": {
"href": "http://localhost:3000/artists/934/albums"
},
"tracks": {
"href": "http://localhost:3000/artists/934/tracks"
}
},
"id": 934,
"name": "Death Cab for Cutie"
},
"composer": {
"_links": {
"self": {
"href": "http://localhost:3000/artists/934"
},
"albums": {
"href": "http://localhost:3000/artists/934/albums"
},
"tracks": {
"href": "http://localhost:3000/artists/934/tracks"
}
},
"id": 934,
"name": "Death Cab for Cutie"
}
}
},
{
"_links": {
"self": {
"href": "http://localhost:3000/albums/4321"
},
"tracks": {
"href": "http://localhost:3000/albums/4321/tracks"
},
"artist": {
"href": "http://localhost:3000/artists/9874"
},
"image": {
"href": "http://localhost:3000/albums/101/image"
}
},
"id": 101,
"name": "No Deal",
"compilation": false,
"imageURL": "http://localhost:3000/albums/101/image",
"_embedded": {
"artist": {
"_links": {
"self": {
"href": "http://localhost:3000/artists/934"
},
"albums": {
"href": "http://localhost:3000/artists/934/albums"
},
"tracks": {
"href": "http://localhost:3000/artists/934/tracks"
}
},
"id": 9874,
"name": "Melanie De Biasio"
},
"composer": {
"_links": {
"self": {
"href": "http://localhost:3000/composers/934"
},
"albums": {
"href": "http://localhost:3000/composers/934/albums"
},
"tracks": {
"href": "http://localhost:3000/composers/934/tracks"
}
},
"id": 934,
"name": "Richard D James"
}
}
}
]
}
}HTTP status code 400
Bad request
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
},
"description": {
"type": "string"
},
"debug": {
"type": "object"
}
},
"additionalProperties": false,
"required": [
"code",
"message",
"description"
]
}
},
"additionalProperties": false,
"required": [
"error"
]
}Example:
{
"error": {
"code": 1301,
"message": "Some headline error message",
"description": "A more detailed description of the error"
}
}
Everything to do with tracks
Returns the available operations on this resource
Returns a paginated collection of tracks
get /artists/{id}/tracks
Returns a paginated collection of tracks
URI Parameters
- id: required (string)
artist identifier
Query Parameters
- response: (one of lite, standard, full - default: standard)
Provides the option to tailor the verbosity of the response information. If not specified the default is standard.
- pageSize: (number - default: 50)
The number of items per page
- page: (number - default: 0)
The page number to return
HTTP status code 200
tracks schema and tracks sample data included
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"_links": {
"type": "object",
"properties": {
"self": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
}
},
"required": [
"self"
]
},
"count": {
"type": "integer"
},
"total": {
"type": "integer"
},
"_embedded": {
"type": "object",
"properties": {
"tracks": {
"type": "array",
"items": {
"$ref": "http://localhost:3000/v1/schemas/track.json"
}
}
},
"additionalProperties": false,
"required": [
"tracks"
]
}
},
"additionalProperties": false,
"required": [
"_links",
"count",
"total",
"_embedded"
]
}Example:
{
"_links": {
"self": {
"href": "http://localhost:3000/artists/964/tracks"
},
"next": {
"href": "http://localhost:3000/artists/964/tracks?page=2"
},
"last": {
"href": "http://localhost:3000/artists/964/tracks?page=100"
}
},
"count": 2,
"total": 100,
"_embedded": {
"tracks": [
{
"_links": {
"self": {
"href": "http://localhost:3000/tracks/602"
},
"album": {
"href": "http://localhost:3000/albums/964"
},
"artist": {
"href": "http://localhost:3000/artists/5435"
},
"stream": {
"href": "http://localhost:3000/tracks/602/stream"
}
},
"id": 602,
"name": "Black Sun",
"duration": 180,
"trackNumber": 2
},
{
"_links": {
"self": {
"href": "http://localhost:3000/tracks/603"
},
"album": {
"href": "http://localhost:3000/albums/964"
},
"artist": {
"href": "http://localhost:3000/artists/5435"
},
"stream": {
"href": "http://localhost:3000/tracks/602/stream"
}
},
"id": 603,
"name": "The Ghosts Of Beverly Drive",
"duration": 240,
"trackNumber": 3
}
]
}
}HTTP status code 400
Bad request
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
},
"description": {
"type": "string"
},
"debug": {
"type": "object"
}
},
"additionalProperties": false,
"required": [
"code",
"message",
"description"
]
}
},
"additionalProperties": false,
"required": [
"error"
]
}Example:
{
"error": {
"code": 1301,
"message": "Some headline error message",
"description": "A more detailed description of the error"
}
}
Authors
Everything to do with authors
Returns the available operations on this resource
Returns a paginated collection of authors
get /authors
Returns a paginated collection of authors
Query Parameters
- response: (one of lite, standard, full - default: standard)
Provides the option to tailor the verbosity of the response information. If not specified the default is standard.
- pageSize: (number - default: 50)
The number of items per page
- page: (number - default: 0)
The page number to return
HTTP status code 200
authors schema and authors sample data included
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"_links": {
"type": "object",
"properties": {
"self": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
}
},
"required": [
"self"
]
},
"count": {
"type": "integer"
},
"total": {
"type": "integer"
},
"_embedded": {
"type": "object",
"properties": {
"authors": {
"type": "array",
"items": {
"$ref": "http://localhost:3000/v1/schemas/author.json"
}
}
},
"additionalProperties": false,
"required": [
"authors"
]
}
},
"additionalProperties": false,
"required": [
"_links",
"count",
"total",
"_embedded"
]
}Example:
{
"count": 2,
"total": 2,
"_links": {
"self": {
"href": "http://localhost:3000/authors"
},
"first": {
"href": "http://localhost:3000/authors?page=1&pageSize=50"
},
"last": {
"href": "http://localhost:3000/authors?page=1&pageSize=50"
}
},
"_embedded": {
"authors": [
{
"id": 2,
"name": "Author 1",
"_links": {
"self": {
"href": "http://localhost:3000/authors/2"
},
"podcasts": {
"href": "http://localhost:3000/authors/2/podcasts"
},
"episodes": {
"href": "http://localhost:3000/authors/2/episodes"
}
}
},
{
"id": 3,
"name": "Dave",
"_links": {
"self": {
"href": "http://localhost:3000/authors/3"
},
"podcasts": {
"href": "http://localhost:3000/authors/3/podcasts"
},
"episodes": {
"href": "http://localhost:3000/authors/3/episodes"
}
}
}
]
}
}HTTP status code 400
Bad request
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
},
"description": {
"type": "string"
},
"debug": {
"type": "object"
}
},
"additionalProperties": false,
"required": [
"code",
"message",
"description"
]
}
},
"additionalProperties": false,
"required": [
"error"
]
}Example:
{
"error": {
"code": 1301,
"message": "Some headline error message",
"description": "A more detailed description of the error"
}
}
Respresentation of a author resource
Returns the available operations on this resource
Returns the author with the given id
get /authors/{id}
Returns the author with the given id
URI Parameters
- id: required (string)
author identifier
Query Parameters
- response: (one of lite, standard, full - default: standard)
Provides the option to tailor the verbosity of the response information. If not specified the default is standard.
HTTP status code 200
author schema and author sample data included
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"_links": {
"type": "object",
"properties": {
"self": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
},
"podcasts": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
},
"episodes": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
}
},
"required": [
"self",
"podcasts",
"episodes"
]
},
"id": {
"type": "integer"
},
"name": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"_links",
"id",
"name"
]
}Example:
{
"id": 3,
"name": "Dave",
"_links": {
"self": {
"href": "http://localhost:3000/authors/3"
},
"podcasts": {
"href": "http://localhost:3000/authors/3/podcasts"
},
"episodes": {
"href": "http://localhost:3000/authors/3/episodes"
}
}
}HTTP status code 404
Resource not found
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
},
"description": {
"type": "string"
},
"debug": {
"type": "object"
}
},
"additionalProperties": false,
"required": [
"code",
"message",
"description"
]
}
},
"additionalProperties": false,
"required": [
"error"
]
}Example:
{
"error": {
"code": 1301,
"message": "Some headline error message",
"description": "A more detailed description of the error"
}
}
Everything to do with podcasts
Returns the available operations on this resource
Returns a paginated collection of podcasts
get /authors/{id}/podcasts
Returns a paginated collection of podcasts
URI Parameters
- id: required (string)
author identifier
Query Parameters
- response: (one of lite, standard, full - default: standard)
Provides the option to tailor the verbosity of the response information. If not specified the default is standard.
- pageSize: (number - default: 50)
The number of items per page
- page: (number - default: 0)
The page number to return
HTTP status code 200
podcasts schema and podcasts sample data included
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"_links": {
"type": "object",
"properties": {
"self": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
}
},
"required": [
"self"
]
},
"count": {
"type": "integer"
},
"total": {
"type": "integer"
},
"_embedded": {
"type": "object",
"properties": {
"podcasts": {
"type": "array",
"items": {
"$ref": "http://localhost:3000/v1/schemas/podcast.json"
}
}
},
"additionalProperties": false,
"required": [
"podcasts"
]
}
},
"additionalProperties": false,
"required": [
"_links",
"count",
"total",
"_embedded"
]
}Example:
{
"count": 1,
"total": 1,
"_links": {
"self": {
"href": "http://192.168.1.106:3000/authors/3/podcasts"
},
"first": {
"href": "http://192.168.1.106:3000/authors/3/podcasts?page=1&pageSize=50"
},
"last": {
"href": "http://192.168.1.106:3000/authors/3/podcasts?page=1&pageSize=50"
}
},
"_embedded": {
"podcasts": [
{
"id": 3,
"name": "Alan Davies As Yet Untitled",
"episodeCount": 1,
"imageURL": "http://192.168.1.106:3000/podcasts/3/image",
"_links": {
"self": {
"href": "http://192.168.1.106:3000/podcasts/3"
},
"author": {
"href": "http://192.168.1.106:3000/authors/3"
},
"episodes": {
"href": "http://192.168.1.106:3000/podcasts/3/episodes?author=3"
},
"image": {
"href": "http://192.168.1.106:3000/podcasts/3/image"
}
},
"_embedded": {
"author": {
"id": 3,
"name": "Dave",
"_links": {
"self": {
"href": "http://192.168.1.106:3000/authors/3"
},
"podcasts": {
"href": "http://192.168.1.106:3000/authors/3/podcasts"
},
"episodes": {
"href": "http://192.168.1.106:3000/authors/3/episodes"
}
}
}
}
}
]
}
}HTTP status code 400
Bad request
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
},
"description": {
"type": "string"
},
"debug": {
"type": "object"
}
},
"additionalProperties": false,
"required": [
"code",
"message",
"description"
]
}
},
"additionalProperties": false,
"required": [
"error"
]
}Example:
{
"error": {
"code": 1301,
"message": "Some headline error message",
"description": "A more detailed description of the error"
}
}
Everything to do with episodes
Returns the available operations on this resource
Returns a paginated collection of episodes
get /authors/{id}/episodes
Returns a paginated collection of episodes
URI Parameters
- id: required (string)
author identifier
Query Parameters
- response: (one of lite, standard, full - default: standard)
Provides the option to tailor the verbosity of the response information. If not specified the default is standard.
- pageSize: (number - default: 50)
The number of items per page
- page: (number - default: 0)
The page number to return
HTTP status code 200
episodes schema and episodes sample data included
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"_links": {
"type": "object",
"properties": {
"self": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
}
},
"required": [
"self"
]
},
"count": {
"type": "integer"
},
"total": {
"type": "integer"
},
"_embedded": {
"type": "object",
"properties": {
"episodes": {
"type": "array",
"items": {
"$ref": "http://localhost:3000/v1/schemas/episode.json"
}
}
},
"additionalProperties": false,
"required": [
"episodes"
]
}
},
"additionalProperties": false,
"required": [
"_links",
"count",
"total",
"_embedded"
]
}Example:
{
"count": 1,
"total": 1,
"_links": {
"self": {
"href": "http://192.168.1.106:3000/authors/3/podcasts"
},
"first": {
"href": "http://192.168.1.106:3000/authors/3/podcasts?page=1&pageSize=50"
},
"last": {
"href": "http://192.168.1.106:3000/authors/3/podcasts?page=1&pageSize=50"
}
},
"_embedded": {
"podcasts": [
{
"id": 3,
"name": "Alan Davies As Yet Untitled",
"episodeCount": 1,
"imageURL": "http://192.168.1.106:3000/podcasts/3/image",
"_links": {
"self": {
"href": "http://192.168.1.106:3000/podcasts/3"
},
"author": {
"href": "http://192.168.1.106:3000/authors/3"
},
"episodes": {
"href": "http://192.168.1.106:3000/podcasts/3/episodes?author=3"
},
"image": {
"href": "http://192.168.1.106:3000/podcasts/3/image"
}
},
"_embedded": {
"author": {
"id": 3,
"name": "Dave",
"_links": {
"self": {
"href": "http://192.168.1.106:3000/authors/3"
},
"podcasts": {
"href": "http://192.168.1.106:3000/authors/3/podcasts"
},
"episodes": {
"href": "http://192.168.1.106:3000/authors/3/episodes"
}
}
}
}
}
]
}
}HTTP status code 400
Bad request
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
},
"description": {
"type": "string"
},
"debug": {
"type": "object"
}
},
"additionalProperties": false,
"required": [
"code",
"message",
"description"
]
}
},
"additionalProperties": false,
"required": [
"error"
]
}Example:
{
"error": {
"code": 1301,
"message": "Some headline error message",
"description": "A more detailed description of the error"
}
}
Composers
Everything to do with composers
Returns the available operations on this resource
Returns a paginated collection of composers
get /composers
Returns a paginated collection of composers
Query Parameters
- response: (one of lite, standard, full - default: standard)
Provides the option to tailor the verbosity of the response information. If not specified the default is standard.
- pageSize: (number - default: 50)
The number of items per page
- page: (number - default: 0)
The page number to return
HTTP status code 200
composers schema and composers sample data included
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"_links": {
"type": "object",
"properties": {
"self": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
}
},
"required": [
"self"
]
},
"count": {
"type": "integer"
},
"total": {
"type": "integer"
},
"_embedded": {
"type": "object",
"properties": {
"artists": {
"type": "array",
"items": {
"$ref": "http://localhost:3000/v1/schemas/artist.json"
}
}
},
"additionalProperties": false,
"required": [
"artists"
]
}
},
"additionalProperties": false,
"required": [
"_links",
"count",
"total",
"_embedded"
]
}Example:
{
"_links": {
"self": {
"href": "http://localhost:3000/composers"
},
"next": {
"href": "http://localhost:3000/composers?page=2"
},
"last": {
"href": "http://localhost:3000/composers?page=100"
}
},
"count": 2,
"total": 10,
"_embedded": {
"composers": [
{
"_links": {
"self": {
"href": "http://localhost:3000/composers/33"
},
"albums": {
"href": "http://localhost:3000/composers/33/albums"
},
"tracks": {
"href": "http://localhost:3000/composers/33/tracks"
}
},
"id": 33,
"name": "Richard D James"
},
{
"_links": {
"self": {
"href": "http://localhost:3000/composers/33"
},
"albums": {
"href": "http://localhost:3000/composers/33/albums"
},
"tracks": {
"href": "http://localhost:3000/composers/33/tracks"
}
},
"id": 33,
"name": "Richard D James"
}
]
}
}HTTP status code 400
Bad request
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
},
"description": {
"type": "string"
},
"debug": {
"type": "object"
}
},
"additionalProperties": false,
"required": [
"code",
"message",
"description"
]
}
},
"additionalProperties": false,
"required": [
"error"
]
}Example:
{
"error": {
"code": 1301,
"message": "Some headline error message",
"description": "A more detailed description of the error"
}
}
Respresentation of a composer resource
Returns the available operations on this resource
Returns the composer with the given id
get /composers/{id}
Returns the composer with the given id
URI Parameters
- id: required (string)
composer identifier
Query Parameters
- response: (one of lite, standard, full - default: standard)
Provides the option to tailor the verbosity of the response information. If not specified the default is standard.
HTTP status code 200
composer schema and composer sample data included
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"_links": {
"type": "object",
"properties": {
"self": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
},
"albums": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
},
"tracks": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
}
},
"required": [
"self",
"albums",
"tracks"
]
},
"id": {
"type": "integer"
},
"name": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"_links",
"id",
"name"
]
}HTTP status code 404
Resource not found
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
},
"description": {
"type": "string"
},
"debug": {
"type": "object"
}
},
"additionalProperties": false,
"required": [
"code",
"message",
"description"
]
}
},
"additionalProperties": false,
"required": [
"error"
]
}Example:
{
"error": {
"code": 1301,
"message": "Some headline error message",
"description": "A more detailed description of the error"
}
}
Everything to do with albums
Returns the available operations on this resource
Returns a paginated collection of albums
get /composers/{id}/albums
Returns a paginated collection of albums
URI Parameters
- id: required (string)
composer identifier
Query Parameters
- response: (one of lite, standard, full - default: standard)
Provides the option to tailor the verbosity of the response information. If not specified the default is standard.
- pageSize: (number - default: 50)
The number of items per page
- page: (number - default: 0)
The page number to return
HTTP status code 200
albums schema and albums sample data included
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"_links": {
"type": "object",
"properties": {
"self": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
}
},
"required": [
"self"
]
},
"count": {
"type": "integer"
},
"total": {
"type": "integer"
},
"_embedded": {
"type": "object",
"properties": {
"albums": {
"type": "array",
"items": {
"$ref": "http://localhost:3000/v1/schemas/album.json"
}
}
},
"additionalProperties": false,
"required": [
"albums"
]
}
},
"additionalProperties": false,
"required": [
"_links",
"count",
"total",
"_embedded"
]
}Example:
{
"_links": {
"self": {
"href": "http://localhost:3000/composers/33/albums"
},
"next": {
"href": "http://localhost:3000/composers/33/albums?page=2"
},
"last": {
"href": "http://localhost:3000/composers/33/albums?page=100"
}
},
"count": 2,
"total": 10,
"_embedded": {
"albums": [
{
"_links": {
"self": {
"href": "http://localhost:3000/albums/45"
},
"tracks": {
"href": "http://localhost:3000/albums/45/tracks"
},
"artist": {
"href": "http://localhost:3000/artist/777"
},
"image": {
"href": "http://localhost:3000/albums/45/image"
}
},
"id": 222,
"name": "I Care Because You Do",
"compilation": false,
"imageURL": "http://localhost:3000/albums/222/image",
"_embedded": {
"artist": {
"_links": {
"self": {
"href": "http://localhost:3000/artists/55"
},
"albums": {
"href": "http://localhost:3000/artists/55/albums"
},
"tracks": {
"href": "http://localhost:3000/artists/55/tracks"
}
},
"id": 777,
"name": "Aphex Twin"
},
"composer": {
"_links": {
"self": {
"href": "http://localhost:3000/composers/33"
},
"albums": {
"href": "http://localhost:3000/composers/33/albums"
},
"tracks": {
"href": "http://localhost:3000/composers/33/tracks"
}
},
"id": 33,
"name": "Richard D James"
}
}
},
{
"_links": {
"self": {
"href": "http://localhost:3000/albums/45"
},
"tracks": {
"href": "http://localhost:3000/albums/45/tracks"
},
"artist": {
"href": "http://localhost:3000/artist/777"
},
"image": {
"href": "http://localhost:3000/albums/45/image"
}
},
"id": 223,
"name": "Analogue Bubblebath 4",
"compilation": false,
"imageURL": "http://localhost:3000/albums/223/image",
"_embedded": {
"artist": {
"_links": {
"self": {
"href": "http://localhost:3000/artists/55"
},
"albums": {
"href": "http://localhost:3000/artists/55/albums"
},
"tracks": {
"href": "http://localhost:3000/artists/55/tracks"
}
},
"id": 777,
"name": "Aphex Twin"
},
"composer": {
"_links": {
"self": {
"href": "http://localhost:3000/composers/33"
},
"albums": {
"href": "http://localhost:3000/composers/33/albums"
},
"tracks": {
"href": "http://localhost:3000/composers/33/tracks"
}
},
"id": 33,
"name": "Richard D James"
}
}
}
]
}
}HTTP status code 400
Bad request
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
},
"description": {
"type": "string"
},
"debug": {
"type": "object"
}
},
"additionalProperties": false,
"required": [
"code",
"message",
"description"
]
}
},
"additionalProperties": false,
"required": [
"error"
]
}Example:
{
"error": {
"code": 1301,
"message": "Some headline error message",
"description": "A more detailed description of the error"
}
}
Everything to do with tracks
Returns the available operations on this resource
Returns a paginated collection of tracks
get /composers/{id}/tracks
Returns a paginated collection of tracks
URI Parameters
- id: required (string)
composer identifier
Query Parameters
- response: (one of lite, standard, full - default: standard)
Provides the option to tailor the verbosity of the response information. If not specified the default is standard.
- pageSize: (number - default: 50)
The number of items per page
- page: (number - default: 0)
The page number to return
HTTP status code 200
tracks schema and tracks sample data included
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"_links": {
"type": "object",
"properties": {
"self": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
}
},
"required": [
"self"
]
},
"count": {
"type": "integer"
},
"total": {
"type": "integer"
},
"_embedded": {
"type": "object",
"properties": {
"tracks": {
"type": "array",
"items": {
"$ref": "http://localhost:3000/v1/schemas/track.json"
}
}
},
"additionalProperties": false,
"required": [
"tracks"
]
}
},
"additionalProperties": false,
"required": [
"_links",
"count",
"total",
"_embedded"
]
}Example:
{
"_links": {
"self": {
"href": "http://localhost:3000/composers/33/tracks"
},
"next": {
"href": "http://localhost:3000/composers/33/tracks?page=2"
},
"last": {
"href": "http://localhost:3000/composers/33/tracks?page=100"
}
},
"count": 2,
"total": 100,
"_embedded": {
"tracks": [
{
"_links": {
"self": {
"href": "http://localhost:3000/tracks/700"
},
"album": {
"href": "http://localhost:3000/albums/45"
},
"artist": {
"href": "http://localhost:3000/artists/33"
},
"stream": {
"href": "http://localhost:3000/tracks/700/stream"
}
},
"id": 700,
"name": "The Waxen Pith",
"duration": 180,
"trackNumber": 2
},
{
"_links": {
"self": {
"href": "http://localhost:3000/tracks/701"
},
"album": {
"href": "http://localhost:3000/albums/45"
},
"artist": {
"href": "http://localhost:3000/artists/33"
},
"stream": {
"href": "http://localhost:3000/tracks/701/stream"
}
},
"id": 701,
"name": "Wax The Nip",
"duration": 180,
"trackNumber": 3
}
]
}
}HTTP status code 400
Bad request
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
},
"description": {
"type": "string"
},
"debug": {
"type": "object"
}
},
"additionalProperties": false,
"required": [
"code",
"message",
"description"
]
}
},
"additionalProperties": false,
"required": [
"error"
]
}Example:
{
"error": {
"code": 1301,
"message": "Some headline error message",
"description": "A more detailed description of the error"
}
}
Episodes
Everything to do with episodes
Returns the available operations on this resource
Returns a paginated collection of episodes
get /episodes
Returns a paginated collection of episodes
Query Parameters
- response: (one of lite, standard, full - default: standard)
Provides the option to tailor the verbosity of the response information. If not specified the default is standard.
- pageSize: (number - default: 50)
The number of items per page
- page: (number - default: 0)
The page number to return
HTTP status code 200
episodes schema and episodes sample data included
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"_links": {
"type": "object",
"properties": {
"self": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
}
},
"required": [
"self"
]
},
"count": {
"type": "integer"
},
"total": {
"type": "integer"
},
"_embedded": {
"type": "object",
"properties": {
"episodes": {
"type": "array",
"items": {
"$ref": "http://localhost:3000/v1/schemas/episode.json"
}
}
},
"additionalProperties": false,
"required": [
"episodes"
]
}
},
"additionalProperties": false,
"required": [
"_links",
"count",
"total",
"_embedded"
]
}Example:
{
"count": 3,
"total": 3,
"_links": {
"self": {
"href": "http://localhost:3000/episodes"
},
"first": {
"href": "http://localhost:3000/episodes?page=1&pageSize=50"
},
"last": {
"href": "http://localhost:3000/episodes?page=1&pageSize=50"
}
},
"_embedded": {
"episodes": [
{
"id": 4,
"name": "#Itmusthavebeenbigtoservealotofpeople",
"duration": 180,
"_links": {
"self": {
"href": "http://localhost:3000/episodes/4"
},
"podcast": {
"href": "http://localhost:3000/podcasts/undefined"
},
"author": {
"href": "http://localhost:3000/authors/undefined"
},
"stream": {
"href": "http://localhost:3000/episodes/4/stream"
}
},
"_embedded": {
"podcast": {
"id": 3,
"name": "Alan Davies As Yet Untitled",
"episodeCount": 1,
"imageURL": "http://localhost:3000/podcasts/3/image",
"_links": {
"self": {
"href": "http://localhost:3000/podcasts/3"
},
"author": {
"href": "http://localhost:3000/authors/3"
},
"episodes": {
"href": "http://localhost:3000/podcasts/3/episodes"
},
"image": {
"href": "http://localhost:3000/podcasts/3/image"
}
},
"_embedded": {
"author": {
"id": 3,
"name": "Dave",
"_links": {
"self": {
"href": "http://localhost:3000/authors/3"
},
"podcasts": {
"href": "http://localhost:3000/authors/3/podcasts"
},
"episodes": {
"href": "http://localhost:3000/authors/3/episodes"
}
}
}
}
},
"author": {
"id": 3,
"name": "Dave",
"_links": {
"self": {
"href": "http://localhost:3000/authors/3"
},
"podcasts": {
"href": "http://localhost:3000/authors/3/podcasts"
},
"episodes": {
"href": "http://localhost:3000/authors/3/episodes"
}
}
}
}
},
{
"id": 3,
"name": "Episode 0",
"duration": 180,
"_links": {
"self": {
"href": "http://localhost:3000/episodes/3"
},
"podcast": {
"href": "http://localhost:3000/podcasts/undefined"
},
"author": {
"href": "http://localhost:3000/authors/undefined"
},
"stream": {
"href": "http://localhost:3000/episodes/3/stream"
}
},
"_embedded": {
"podcast": {
"id": 2,
"name": "Podcast 1",
"episodeCount": 2,
"imageURL": "http://localhost:3000/podcasts/2/image",
"_links": {
"self": {
"href": "http://localhost:3000/podcasts/2"
},
"author": {
"href": "http://localhost:3000/authors/2"
},
"episodes": {
"href": "http://localhost:3000/podcasts/2/episodes"
},
"image": {
"href": "http://localhost:3000/podcasts/2/image"
}
},
"_embedded": {
"author": {
"id": 2,
"name": "Author 1",
"_links": {
"self": {
"href": "http://localhost:3000/authors/2"
},
"podcasts": {
"href": "http://localhost:3000/authors/2/podcasts"
},
"episodes": {
"href": "http://localhost:3000/authors/2/episodes"
}
}
}
}
},
"author": {
"id": 2,
"name": "Author 1",
"_links": {
"self": {
"href": "http://localhost:3000/authors/2"
},
"podcasts": {
"href": "http://localhost:3000/authors/2/podcasts"
},
"episodes": {
"href": "http://localhost:3000/authors/2/episodes"
}
}
}
}
},
{
"id": 2,
"name": "Episode 1",
"duration": 180,
"_links": {
"self": {
"href": "http://localhost:3000/episodes/2"
},
"podcast": {
"href": "http://localhost:3000/podcasts/undefined"
},
"author": {
"href": "http://localhost:3000/authors/undefined"
},
"stream": {
"href": "http://localhost:3000/episodes/2/stream"
}
},
"_embedded": {
"podcast": {
"id": 2,
"name": "Podcast 1",
"episodeCount": 2,
"imageURL": "http://localhost:3000/podcasts/2/image",
"_links": {
"self": {
"href": "http://localhost:3000/podcasts/2"
},
"author": {
"href": "http://localhost:3000/authors/2"
},
"episodes": {
"href": "http://localhost:3000/podcasts/2/episodes"
},
"image": {
"href": "http://localhost:3000/podcasts/2/image"
}
},
"_embedded": {
"author": {
"id": 2,
"name": "Author 1",
"_links": {
"self": {
"href": "http://localhost:3000/authors/2"
},
"podcasts": {
"href": "http://localhost:3000/authors/2/podcasts"
},
"episodes": {
"href": "http://localhost:3000/authors/2/episodes"
}
}
}
}
},
"author": {
"id": 2,
"name": "Author 1",
"_links": {
"self": {
"href": "http://localhost:3000/authors/2"
},
"podcasts": {
"href": "http://localhost:3000/authors/2/podcasts"
},
"episodes": {
"href": "http://localhost:3000/authors/2/episodes"
}
}
}
}
}
]
}
}HTTP status code 400
Bad request
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
},
"description": {
"type": "string"
},
"debug": {
"type": "object"
}
},
"additionalProperties": false,
"required": [
"code",
"message",
"description"
]
}
},
"additionalProperties": false,
"required": [
"error"
]
}Example:
{
"error": {
"code": 1301,
"message": "Some headline error message",
"description": "A more detailed description of the error"
}
}
Respresentation of a episode resource
Returns the available operations on this resource
Returns the episode with the given id
get /episodes/{id}
Returns the episode with the given id
URI Parameters
- id: required (string)
episode identifier
Query Parameters
- response: (one of lite, standard, full - default: standard)
Provides the option to tailor the verbosity of the response information. If not specified the default is standard.
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"_links": {
"type": "object",
"properties": {
"self": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
},
"podcast": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
},
"author": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
},
"stream": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
}
},
"required": [
"self",
"podcast",
"author",
"stream"
]
},
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"duration": {
"type": "integer"
},
"position": {
"type": "integer"
},
"_embedded": {
"type": "object",
"properties": {
"podcast": {
"type": "object",
"$ref": "http://localhost:3000/v1/schemas/podcast-lite.json"
},
"author": {
"type": "object",
"$ref": "http://localhost:3000/v1/schemas/author.json"
}
},
"additionalProperties": false,
"required": [
"podcast",
"author"
]
}
},
"additionalProperties": false,
"required": [
"_links",
"id",
"name",
"duration",
"position",
"_embedded"
]
}Example:
{
"id": 4,
"name": "#Itmusthavebeenbigtoservealotofpeople",
"duration": 180,
"bitRate": 192,
"sampleRate": 44100,
"_links": {
"self": {
"href": "http://localhost:3000/episodes/4"
},
"podcast": {
"href": "http://localhost:3000/podcasts/undefined"
},
"author": {
"href": "http://localhost:3000/authors/undefined"
},
"stream": {
"href": "http://localhost:3000/episodes/4/stream"
}
},
"_embedded": {
"podcast": {
"id": 3,
"name": "Alan Davies As Yet Untitled",
"imageURL": "http://localhost:3000/podcasts/3/image",
"_links": {
"self": {
"href": "http://localhost:3000/podcasts/3"
},
"author": {
"href": "http://localhost:3000/authors/3"
},
"episodes": {
"href": "http://localhost:3000/podcasts/3/episodes"
},
"image": {
"href": "http://localhost:3000/podcasts/3/image"
}
}
},
"author": {
"id": 3,
"name": "Dave",
"_links": {
"self": {
"href": "http://localhost:3000/authors/3"
},
"podcasts": {
"href": "http://localhost:3000/authors/3/podcasts"
},
"episodes": {
"href": "http://localhost:3000/authors/3/episodes"
}
}
}
}
}HTTP status code 404
Resource not found
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
},
"description": {
"type": "string"
},
"debug": {
"type": "object"
}
},
"additionalProperties": false,
"required": [
"code",
"message",
"description"
]
}
},
"additionalProperties": false,
"required": [
"error"
]
}Example:
{
"error": {
"code": 1301,
"message": "Some headline error message",
"description": "A more detailed description of the error"
}
}
Now we get to play something
Returns the available operations on this resource
This is the actual stream URL for the podcast episode with the given id
get /episodes/{id}/stream
This is the actual stream URL for the podcast episode with the given id
URI Parameters
- id: required (string)
episode identifier
HTTP status code 200
The exact mime type will depend on the audio format being served
Body
Type: audio/mpeg
HTTP status code 404
Resource not found
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
},
"description": {
"type": "string"
},
"debug": {
"type": "object"
}
},
"additionalProperties": false,
"required": [
"code",
"message",
"description"
]
}
},
"additionalProperties": false,
"required": [
"error"
]
}Example:
{
"error": {
"code": 1301,
"message": "Some headline error message",
"description": "A more detailed description of the error"
}
}
Genres
Everything to do with genres
Returns the available operations on this resource
Returns a paginated collection of genres
get /genres
Returns a paginated collection of genres
Query Parameters
- response: (one of lite, standard, full - default: standard)
Provides the option to tailor the verbosity of the response information. If not specified the default is standard.
- pageSize: (number - default: 50)
The number of items per page
- page: (number - default: 0)
The page number to return
HTTP status code 200
genres schema and genres sample data included
Body
Type: application/json
Schema:
genresExample:
{
"_links": {
"self": {
"href": "http://localhost:3000/genres"
},
"next": {
"href": "http://localhost:3000/genres?page=2"
},
"last": {
"href": "http://localhost:3000/genres?page=100"
}
},
"_embedded": {
"genres": [
{
"_links": {
"self": {
"href": "http://localhost:3000/genres/2"
},
"albums": {
"href": "http://localhost:3000/genres/2/albums"
}
},
"id": 2,
"name": "Pop"
},
{
"_links": {
"self": {
"href": "http://localhost:3000/genres/3"
},
"albums": {
"href": "http://localhost:3000/genres/3/albums"
}
},
"id": 3,
"name": "Rock"
}
]
}
}HTTP status code 400
Bad request
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
},
"description": {
"type": "string"
},
"debug": {
"type": "object"
}
},
"additionalProperties": false,
"required": [
"code",
"message",
"description"
]
}
},
"additionalProperties": false,
"required": [
"error"
]
}Example:
{
"error": {
"code": 1301,
"message": "Some headline error message",
"description": "A more detailed description of the error"
}
}
Respresentation of a genre resource
Returns the available operations on this resource
Returns the genre with the given id
get /genres/{id}
Returns the genre with the given id
URI Parameters
- id: required (string)
genre identifier
Query Parameters
- response: (one of lite, standard, full - default: standard)
Provides the option to tailor the verbosity of the response information. If not specified the default is standard.
HTTP status code 200
genre schema and genre sample data included
Body
Type: application/json
Schema:
genreExample:
{
"_links": {
"self": {
"href": "http://localhost:3000/genres/2"
},
"albums": {
"href": "http://localhost:3000/genres/2/albums"
},
"tracks": {
"href": "http://localhost:3000/genres/2/tracks"
}
},
"id": 2,
"name": "Pop"
}HTTP status code 404
Resource not found
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
},
"description": {
"type": "string"
},
"debug": {
"type": "object"
}
},
"additionalProperties": false,
"required": [
"code",
"message",
"description"
]
}
},
"additionalProperties": false,
"required": [
"error"
]
}Example:
{
"error": {
"code": 1301,
"message": "Some headline error message",
"description": "A more detailed description of the error"
}
}
Everything to do with albums
Returns the available operations on this resource
Returns a paginated collection of albums
get /genres/{id}/albums
Returns a paginated collection of albums
URI Parameters
- id: required (string)
genre identifier
Query Parameters
- response: (one of lite, standard, full - default: standard)
Provides the option to tailor the verbosity of the response information. If not specified the default is standard.
- pageSize: (number - default: 50)
The number of items per page
- page: (number - default: 0)
The page number to return
HTTP status code 200
albums schema and albums sample data included
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"_links": {
"type": "object",
"properties": {
"self": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
}
},
"required": [
"self"
]
},
"count": {
"type": "integer"
},
"total": {
"type": "integer"
},
"_embedded": {
"type": "object",
"properties": {
"albums": {
"type": "array",
"items": {
"$ref": "http://localhost:3000/v1/schemas/album.json"
}
}
},
"additionalProperties": false,
"required": [
"albums"
]
}
},
"additionalProperties": false,
"required": [
"_links",
"count",
"total",
"_embedded"
]
}Example:
{
"_links": {
"self": {
"href": "http://localhost:3000/artists/964/albums"
},
"next": {
"href": "http://localhost:3000/artists/964/albums?page=2"
},
"last": {
"href": "http://localhost:3000/artists/964/albums?page=100"
}
},
"count": 2,
"total": 10,
"_embedded": {
"albums": [
{
"_links": {
"self": {
"href": "http://localhost:3000/albums/934"
},
"tracks": {
"href": "http://localhost:3000/albums/934/tracks"
},
"artist": {
"href": "http://localhost:3000/artists/934"
},
"image": {
"href": "http://localhost:3000/albums/100/image"
}
},
"id": 100,
"name": "Kintsugi",
"compilation": false,
"imageURL": "http://localhost:3000/albums/100/image",
"_embedded": {
"artist": {
"_links": {
"self": {
"href": "http://localhost:3000/artists/934"
},
"albums": {
"href": "http://localhost:3000/artists/934/albums"
},
"tracks": {
"href": "http://localhost:3000/artists/934/tracks"
}
},
"id": 934,
"name": "Death Cab for Cutie"
},
"composer": {
"_links": {
"self": {
"href": "http://localhost:3000/artists/934"
},
"albums": {
"href": "http://localhost:3000/artists/934/albums"
},
"tracks": {
"href": "http://localhost:3000/artists/934/tracks"
}
},
"id": 934,
"name": "Death Cab for Cutie"
}
}
},
{
"_links": {
"self": {
"href": "http://localhost:3000/albums/4321"
},
"tracks": {
"href": "http://localhost:3000/albums/4321/tracks"
},
"artist": {
"href": "http://localhost:3000/artists/9874"
},
"image": {
"href": "http://localhost:3000/albums/101/image"
}
},
"id": 101,
"name": "No Deal",
"compilation": false,
"imageURL": "http://localhost:3000/albums/101/image",
"_embedded": {
"artist": {
"_links": {
"self": {
"href": "http://localhost:3000/artists/934"
},
"albums": {
"href": "http://localhost:3000/artists/934/albums"
},
"tracks": {
"href": "http://localhost:3000/artists/934/tracks"
}
},
"id": 9874,
"name": "Melanie De Biasio"
},
"composer": {
"_links": {
"self": {
"href": "http://localhost:3000/composers/934"
},
"albums": {
"href": "http://localhost:3000/composers/934/albums"
},
"tracks": {
"href": "http://localhost:3000/composers/934/tracks"
}
},
"id": 934,
"name": "Richard D James"
}
}
}
]
}
}HTTP status code 400
Bad request
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
},
"description": {
"type": "string"
},
"debug": {
"type": "object"
}
},
"additionalProperties": false,
"required": [
"code",
"message",
"description"
]
}
},
"additionalProperties": false,
"required": [
"error"
]
}Example:
{
"error": {
"code": 1301,
"message": "Some headline error message",
"description": "A more detailed description of the error"
}
}
Everything to do with tracks
Returns the available operations on this resource
Returns a paginated collection of tracks
get /genres/{id}/tracks
Returns a paginated collection of tracks
URI Parameters
- id: required (string)
genre identifier
Query Parameters
- response: (one of lite, standard, full - default: standard)
Provides the option to tailor the verbosity of the response information. If not specified the default is standard.
- pageSize: (number - default: 50)
The number of items per page
- page: (number - default: 0)
The page number to return
HTTP status code 200
tracks schema and tracks sample data included
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"_links": {
"type": "object",
"properties": {
"self": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
}
},
"required": [
"self"
]
},
"count": {
"type": "integer"
},
"total": {
"type": "integer"
},
"_embedded": {
"type": "object",
"properties": {
"tracks": {
"type": "array",
"items": {
"$ref": "http://localhost:3000/v1/schemas/track.json"
}
}
},
"additionalProperties": false,
"required": [
"tracks"
]
}
},
"additionalProperties": false,
"required": [
"_links",
"count",
"total",
"_embedded"
]
}Example:
{
"_links": {
"self": {
"href": "http://localhost:3000/artists/964/tracks"
},
"next": {
"href": "http://localhost:3000/artists/964/tracks?page=2"
},
"last": {
"href": "http://localhost:3000/artists/964/tracks?page=100"
}
},
"count": 2,
"total": 100,
"_embedded": {
"tracks": [
{
"_links": {
"self": {
"href": "http://localhost:3000/tracks/602"
},
"album": {
"href": "http://localhost:3000/albums/964"
},
"artist": {
"href": "http://localhost:3000/artists/5435"
},
"stream": {
"href": "http://localhost:3000/tracks/602/stream"
}
},
"id": 602,
"name": "Black Sun",
"duration": 180,
"trackNumber": 2
},
{
"_links": {
"self": {
"href": "http://localhost:3000/tracks/603"
},
"album": {
"href": "http://localhost:3000/albums/964"
},
"artist": {
"href": "http://localhost:3000/artists/5435"
},
"stream": {
"href": "http://localhost:3000/tracks/602/stream"
}
},
"id": 603,
"name": "The Ghosts Of Beverly Drive",
"duration": 240,
"trackNumber": 3
}
]
}
}HTTP status code 400
Bad request
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
},
"description": {
"type": "string"
},
"debug": {
"type": "object"
}
},
"additionalProperties": false,
"required": [
"code",
"message",
"description"
]
}
},
"additionalProperties": false,
"required": [
"error"
]
}Example:
{
"error": {
"code": 1301,
"message": "Some headline error message",
"description": "A more detailed description of the error"
}
}
Playlists
Everything to do with playlists
Returns the available operations on this resource
Returns a paginated collection of playlists
get /playlists
Returns a paginated collection of playlists
Query Parameters
- response: (one of lite, standard, full - default: standard)
Provides the option to tailor the verbosity of the response information. If not specified the default is standard.
- pageSize: (number - default: 50)
The number of items per page
- page: (number - default: 0)
The page number to return
HTTP status code 200
playlists schema and playlists sample data included
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"_links": {
"type": "object",
"properties": {
"self": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
}
},
"required": [
"self"
]
},
"count": {
"type": "integer"
},
"total": {
"type": "integer"
},
"_embedded": {
"type": "object",
"properties": {
"playlists": {
"type": "array",
"items": {
"$ref": "http://localhost:3000/v1/schemas/playlist.json"
}
}
},
"additionalProperties": false,
"required": [
"playlists"
]
}
},
"additionalProperties": false,
"required": [
"_links",
"count",
"total",
"_embedded"
]
}Example:
{
"_links": {
"self": {
"href": "http://localhost:3000/playlists"
},
"next": {
"href": "http://localhost:3000/playlists?page=2"
},
"last": {
"href": "http://localhost:3000/playlists?page=100"
}
},
"count": 2,
"total": 10,
"_embedded": {
"playlists": [
{
"_links": {
"self": {
"href": "http://localhost:3000/playlists/8000"
},
"tracks": {
"href": "http://localhost:3000/playlists/8000/tracks"
}
},
"id": 8000,
"name": "My Death Cab for Cutie Playlist",
"imageURL": "http://localhost:3000/images/p8000.jpg"
},
{
"_links": {
"self": {
"href": "http://localhost:3000/playlists/8001"
},
"tracks": {
"href": "http://localhost:3000/playlists/8001/tracks"
}
},
"id": 8001,
"name": "My Top 20",
"imageURL": "http://localhost:3000/images/p8001.jpg"
}
]
}
}HTTP status code 400
Bad request
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
},
"description": {
"type": "string"
},
"debug": {
"type": "object"
}
},
"additionalProperties": false,
"required": [
"code",
"message",
"description"
]
}
},
"additionalProperties": false,
"required": [
"error"
]
}Example:
{
"error": {
"code": 1301,
"message": "Some headline error message",
"description": "A more detailed description of the error"
}
}
Respresentation of a playlist resource
Returns the available operations on this resource
Returns the playlist with the given id
get /playlists/{id}
Returns the playlist with the given id
URI Parameters
- id: required (string)
playlist identifier
Query Parameters
- response: (one of lite, standard, full - default: standard)
Provides the option to tailor the verbosity of the response information. If not specified the default is standard.
HTTP status code 200
playlist schema and playlist sample data included
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"_links": {
"type": "object",
"properties": {
"self": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
},
"tracks": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
}
}
},
"required": [
"self",
"tracks"
]
},
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"imageURL": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"_links",
"id",
"name",
"imageURL"
]
}Example:
{
"_links": {
"self": {
"href": "http://localhost:3000/playlists/8000"
},
"tracks": {
"href": "http://localhost:3000/playlists/8000/tracks"
}
},
"id": 8000,
"name": "My Death Cab for Cutie Playlist",
"duration": 2700,
"trackCount": 11,
"imageURL": "http://localhost:3000/images/yosemite.jpg"
}HTTP status code 404
Resource not found
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
},
"description": {
"type": "string"
},
"debug": {
"type": "object"
}
},
"additionalProperties": false,
"required": [
"code",
"message",
"description"
]
}
},
"additionalProperties": false,
"required": [
"error"
]
}Example:
{
"error": {
"code": 1301,
"message": "Some headline error message",
"description": "A more detailed description of the error"
}
}
Everything to do with tracks
Returns the available operations on this resource
Returns a paginated collection of tracks
get /playlists/{id}/tracks
Returns a paginated collection of tracks
URI Parameters
- id: required (string)
playlist identifier
Query Parameters
- response: (one of lite, standard, full - default: standard)
Provides the option to tailor the verbosity of the response information. If not specified the default is standard.
- pageSize: (number - default: 50)
The number of items per page
- page: (number - default: 0)
The page number to return
HTTP status code 200
tracks schema and tracks sample data included
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"_links": {
"type": "object",
"properties": {
"self": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
}
},
"required": [
"self"
]
},
"count": {
"type": "integer"
},
"total": {
"type": "integer"
},
"_embedded": {
"type": "object",
"properties": {
"tracks": {
"type": "array",
"items": {
"$ref": "http://localhost:3000/v1/schemas/track.json"
}
}
},
"additionalProperties": false,
"required": [
"tracks"
]
}
},
"additionalProperties": false,
"required": [
"_links",
"count",
"total",
"_embedded"
]
}Example:
{
"_links": {
"self": {
"href": "http://localhost:3000/playlists/8000/tracks"
},
"next": {
"href": "http://localhost:3000/playlists/8000/tracks?page=2"
},
"last": {
"href": "http://localhost:3000/playlists/8000/tracks?page=100"
}
},
"count": 2,
"total": 100,
"_embedded": {
"tracks": [
{
"_links": {
"self": {
"href": "http://localhost:3000/tracks/602"
},
"album": {
"href": "http://localhost:3000/albums/964"
},
"artist": {
"href": "http://localhost:3000/artists/5435"
},
"stream": {
"href": "http://localhost:3000/tracks/602/stream"
}
},
"id": 602,
"name": "Black Sun",
"duration": 180,
"trackNumber": 2,
"compilation": false
},
{
"_links": {
"self": {
"href": "http://localhost:3000/tracks/603"
},
"album": {
"href": "http://localhost:3000/albums/964"
},
"artist": {
"href": "http://localhost:3000/artists/5435"
},
"stream": {
"href": "http://localhost:3000/tracks/602/stream"
}
},
"id": 603,
"name": "The Ghosts Of Beverly Drive",
"duration": 240,
"trackNumber": 3,
"compilation": false
}
]
}
}HTTP status code 400
Bad request
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
},
"description": {
"type": "string"
},
"debug": {
"type": "object"
}
},
"additionalProperties": false,
"required": [
"code",
"message",
"description"
]
}
},
"additionalProperties": false,
"required": [
"error"
]
}Example:
{
"error": {
"code": 1301,
"message": "Some headline error message",
"description": "A more detailed description of the error"
}
}
Podcasts
Everything to do with podcasts
Returns the available operations on this resource
Returns a paginated collection of podcasts
get /podcasts
Returns a paginated collection of podcasts
Query Parameters
- response: (one of lite, standard, full - default: standard)
Provides the option to tailor the verbosity of the response information. If not specified the default is standard.
- pageSize: (number - default: 50)
The number of items per page
- page: (number - default: 0)
The page number to return
HTTP status code 200
podcasts schema and podcasts sample data included
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"_links": {
"type": "object",
"properties": {
"self": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
}
},
"required": [
"self"
]
},
"count": {
"type": "integer"
},
"total": {
"type": "integer"
},
"_embedded": {
"type": "object",
"properties": {
"podcasts": {
"type": "array",
"items": {
"$ref": "http://localhost:3000/v1/schemas/podcast.json"
}
}
},
"additionalProperties": false,
"required": [
"podcasts"
]
}
},
"additionalProperties": false,
"required": [
"_links",
"count",
"total",
"_embedded"
]
}Example:
{
"count": 2,
"total": 2,
"_links": {
"self": {
"href": "http://192.168.1.106:3000/podcasts"
},
"first": {
"href": "http://192.168.1.106:3000/podcasts?page=1&pageSize=50"
},
"last": {
"href": "http://192.168.1.106:3000/podcasts?page=1&pageSize=50"
}
},
"_embedded": {
"podcasts": [
{
"id": 3,
"name": "Alan Davies As Yet Untitled",
"episodeCount": 1,
"imageURL": "http://192.168.1.106:3000/podcasts/3/image",
"_links": {
"self": {
"href": "http://192.168.1.106:3000/podcasts/3"
},
"author": {
"href": "http://192.168.1.106:3000/authors/3"
},
"episodes": {
"href": "http://192.168.1.106:3000/podcasts/3/episodes"
},
"image": {
"href": "http://192.168.1.106:3000/podcasts/3/image"
}
},
"_embedded": {
"author": {
"id": 3,
"name": "Dave",
"_links": {
"self": {
"href": "http://192.168.1.106:3000/authors/3"
},
"podcasts": {
"href": "http://192.168.1.106:3000/authors/3/podcasts"
},
"episodes": {
"href": "http://192.168.1.106:3000/authors/3/episodes"
}
}
}
}
},
{
"id": 2,
"name": "Podcast 1",
"episodeCount": 2,
"imageURL": "http://192.168.1.106:3000/podcasts/2/image",
"_links": {
"self": {
"href": "http://192.168.1.106:3000/podcasts/2"
},
"author": {
"href": "http://192.168.1.106:3000/authors/2"
},
"episodes": {
"href": "http://192.168.1.106:3000/podcasts/2/episodes"
},
"image": {
"href": "http://192.168.1.106:3000/podcasts/2/image"
}
},
"_embedded": {
"author": {
"id": 2,
"name": "Author 1",
"_links": {
"self": {
"href": "http://192.168.1.106:3000/authors/2"
},
"podcasts": {
"href": "http://192.168.1.106:3000/authors/2/podcasts"
},
"episodes": {
"href": "http://192.168.1.106:3000/authors/2/episodes"
}
}
}
}
}
]
}
}HTTP status code 400
Bad request
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
},
"description": {
"type": "string"
},
"debug": {
"type": "object"
}
},
"additionalProperties": false,
"required": [
"code",
"message",
"description"
]
}
},
"additionalProperties": false,
"required": [
"error"
]
}Example:
{
"error": {
"code": 1301,
"message": "Some headline error message",
"description": "A more detailed description of the error"
}
}
Respresentation of a podcast resource
Returns the available operations on this resource
Returns the podcast with the given id
get /podcasts/{id}
Returns the podcast with the given id
URI Parameters
- id: required (string)
podcast identifier
Query Parameters
- response: (one of lite, standard, full - default: standard)
Provides the option to tailor the verbosity of the response information. If not specified the default is standard.
HTTP status code 200
podcast schema and podcast sample data included
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"_links": {
"type": "object",
"properties": {
"self": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
},
"episodes": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
},
"author": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
},
"image": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
}
},
"required": [
"self",
"episodes",
"author",
"image"
]
},
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"imageURL": {
"type": "string"
},
"_embedded": {
"type": "object",
"properties": {
"author": {
"type": "object",
"$ref": "http://localhost:3000/v1/schemas/author.json"
}
},
"additionalProperties": false,
"required": [
"author"
]
}
},
"additionalProperties": false,
"required": [
"_links",
"id",
"name",
"imageURL",
"_embedded"
]
}Example:
{
"id": 3,
"name": "Alan Davies As Yet Untitled",
"duration": 180,
"episodeCount": 1,
"imageURL": "http://192.168.1.106:3000/podcasts/3/image",
"_links": {
"self": {
"href": "http://192.168.1.106:3000/podcasts/3"
},
"author": {
"href": "http://192.168.1.106:3000/authors/3"
},
"episodes": {
"href": "http://192.168.1.106:3000/podcasts/3/episodes"
},
"image": {
"href": "http://192.168.1.106:3000/podcasts/3/image"
}
},
"_embedded": {
"author": {
"id": 3,
"name": "Dave",
"_links": {
"self": {
"href": "http://192.168.1.106:3000/authors/3"
},
"podcasts": {
"href": "http://192.168.1.106:3000/authors/3/podcasts"
},
"episodes": {
"href": "http://192.168.1.106:3000/authors/3/episodes"
}
}
}
}
}HTTP status code 404
Resource not found
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
},
"description": {
"type": "string"
},
"debug": {
"type": "object"
}
},
"additionalProperties": false,
"required": [
"code",
"message",
"description"
]
}
},
"additionalProperties": false,
"required": [
"error"
]
}Example:
{
"error": {
"code": 1301,
"message": "Some headline error message",
"description": "A more detailed description of the error"
}
}
Everything to do with episodes
Returns the available operations on this resource
Returns a paginated collection of episodes
get /podcasts/{id}/episodes
Returns a paginated collection of episodes
URI Parameters
- id: required (string)
podcast identifier
Query Parameters
- response: (one of lite, standard, full - default: standard)
Provides the option to tailor the verbosity of the response information. If not specified the default is standard.
- pageSize: (number - default: 50)
The number of items per page
- page: (number - default: 0)
The page number to return
- author: (number - default: The podcast author)
See only episodes in the podcast by the specified author.
HTTP status code 200
episodes schema and episodes sample data included
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"_links": {
"type": "object",
"properties": {
"self": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
}
},
"required": [
"self"
]
},
"count": {
"type": "integer"
},
"total": {
"type": "integer"
},
"_embedded": {
"type": "object",
"properties": {
"episodes": {
"type": "array",
"items": {
"$ref": "http://localhost:3000/v1/schemas/episode.json"
}
}
},
"additionalProperties": false,
"required": [
"episodes"
]
}
},
"additionalProperties": false,
"required": [
"_links",
"count",
"total",
"_embedded"
]
}Example:
{
"_links": {
"self": {
"href": "http://localhost:3000/tracks"
},
"next": {
"href": "http://localhost:3000/tracks?page=2"
},
"last": {
"href": "http://localhost:3000/tracks?page=100"
}
},
"count": 2,
"total": 100,
"_embedded": {
"tracks": [
{
"_links": {
"self": {
"href": "http://localhost:3000/tracks/602"
},
"album": {
"href": "http://localhost:3000/albums/964"
},
"artist": {
"href": "http://localhost:3000/artists/5435"
},
"stream": {
"href": "http://localhost:3000/tracks/602/stream"
}
},
"id": 602,
"name": "Black Sun",
"duration": 180,
"position": 2,
"_embedded": {
"album": {
"_links": {
"self": {
"href": "http://localhost:3000/albums/934"
},
"tracks": {
"href": "http://localhost:3000/albums/964/tracks"
},
"artist": {
"href": "http://localhost:3000/artists/5435"
}
},
"id": 934,
"name": "Kintsugi",
"imageURL": "http://localhost:3000/images/yosemite.jpg"
},
"artist": {
"_links": {
"self": {
"href": "http://localhost:3000/artists/934"
},
"albums": {
"href": "http://localhost:3000/artists/934/albums"
},
"tracks": {
"href": "http://localhost:3000/artists/934/tracks"
}
},
"id": 934,
"name": "Death Cab for Cutie"
},
"albumArtist": {
"_links": {
"self": {
"href": "http://localhost:3000/artists/934"
},
"albums": {
"href": "http://localhost:3000/artists/934/albums"
},
"tracks": {
"href": "http://localhost:3000/artists/934/tracks"
}
},
"id": 934,
"name": "Death Cab for Cutie"
},
"composer": {
"_links": {
"self": {
"href": "http://localhost:3000/artists/934"
},
"albums": {
"href": "http://localhost:3000/artists/934/albums"
},
"tracks": {
"href": "http://localhost:3000/artists/934/tracks"
}
},
"id": 934,
"name": "Death Cab for Cutie"
}
}
},
{
"_links": {
"self": {
"href": "http://localhost:3000/tracks/603"
},
"album": {
"href": "http://localhost:3000/albums/964"
},
"artist": {
"href": "http://localhost:3000/artists/5435"
},
"stream": {
"href": "http://localhost:3000/tracks/602/stream"
}
},
"id": 603,
"name": "The Ghosts Of Beverly Drive",
"duration": 240,
"position": 3,
"_embedded": {
"album": {
"_links": {
"self": {
"href": "http://localhost:3000/albums/934"
},
"tracks": {
"href": "http://localhost:3000/albums/964/tracks"
},
"artist": {
"href": "http://localhost:3000/artists/5435"
}
},
"id": 934,
"name": "Kintsugi",
"imageURL": "http://localhost:3000/images/yosemite.jpg"
},
"artist": {
"_links": {
"self": {
"href": "http://localhost:3000/artists/934"
},
"albums": {
"href": "http://localhost:3000/artists/934/albums"
},
"tracks": {
"href": "http://localhost:3000/artists/934/tracks"
}
},
"id": 934,
"name": "Death Cab for Cutie"
},
"albumArtist": {
"_links": {
"self": {
"href": "http://localhost:3000/artists/934"
},
"albums": {
"href": "http://localhost:3000/artists/934/albums"
},
"tracks": {
"href": "http://localhost:3000/artists/934/tracks"
}
},
"id": 934,
"name": "Death Cab for Cutie"
},
"composer": {
"_links": {
"self": {
"href": "http://localhost:3000/artists/934"
},
"albums": {
"href": "http://localhost:3000/artists/934/albums"
},
"tracks": {
"href": "http://localhost:3000/artists/934/tracks"
}
},
"id": 934,
"name": "Death Cab for Cutie"
}
}
}
]
}
}HTTP status code 400
Bad request
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
},
"description": {
"type": "string"
},
"debug": {
"type": "object"
}
},
"additionalProperties": false,
"required": [
"code",
"message",
"description"
]
}
},
"additionalProperties": false,
"required": [
"error"
]
}Example:
{
"error": {
"code": 1301,
"message": "Some headline error message",
"description": "A more detailed description of the error"
}
}
Returns the podcast atwork, optionally dynamically resized depending on the query params passed If only one dimension parameter is given the image will be resized maintain original proportions. NOTE: If you give values that would change the proportions of the image by specifying both params you will get back a squashed or stretched image
get /podcasts/{id}/image
Returns the podcast atwork, optionally dynamically resized depending on the query params passed If only one dimension parameter is given the image will be resized maintain original proportions. NOTE: If you give values that would change the proportions of the image by specifying both params you will get back a squashed or stretched image
URI Parameters
- id: required (string)
podcast identifier
Query Parameters
- w: (number - default: Original image width)
The desired image width
- h: (number - default: Orginal image height)
The desired image height
HTTP status code 200
Body
Type: image/png
HTTP status code 404
Resource not found
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
},
"description": {
"type": "string"
},
"debug": {
"type": "object"
}
},
"additionalProperties": false,
"required": [
"code",
"message",
"description"
]
}
},
"additionalProperties": false,
"required": [
"error"
]
}Example:
{
"error": {
"code": 1301,
"message": "Some headline error message",
"description": "A more detailed description of the error"
}
}
Search
This works by searching on a particular endpoint at a time. The results of album, artist and track searches are NOT combined into one result.
Everything to do with albums
Returns the available operations on this resource
Returns a paginated collection of albums
get /search/albums
Returns a paginated collection of albums
Query Parameters
- query: (string)
A JSON array describing the query;
URL encoded query string. Full matching rules to be determined from existing UIDD
Example:
http:://localhost:3000/search/albums?query=kintsugi
- response: (one of lite, standard, full - default: standard)
Provides the option to tailor the verbosity of the response information. If not specified the default is standard.
- pageSize: (number - default: 50)
The number of items per page
- page: (number - default: 0)
The page number to return
HTTP status code 200
albums schema and albums sample data included
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"_links": {
"type": "object",
"properties": {
"self": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
}
},
"required": [
"self"
]
},
"count": {
"type": "integer"
},
"total": {
"type": "integer"
},
"_embedded": {
"type": "object",
"properties": {
"albums": {
"type": "array",
"items": {
"$ref": "http://localhost:3000/v1/schemas/album.json"
}
}
},
"additionalProperties": false,
"required": [
"albums"
]
}
},
"additionalProperties": false,
"required": [
"_links",
"count",
"total",
"_embedded"
]
}Example:
{
"_links": {
"self": {
"href": "http://localhost:3000/albums"
},
"next": {
"href": "http://localhost:3000/albums?page=2"
},
"last": {
"href": "http://localhost:3000/albums?page=100"
}
},
"count": 2,
"total": 10,
"_embedded": {
"albums": [
{
"_links": {
"self": {
"href": "http://localhost:3000/albums/100"
},
"tracks": {
"href": "http://localhost:3000/albums/100/tracks"
},
"artist": {
"href": "http://localhost:3000/artists/934"
},
"image": {
"href": "http://localhost:3000/albums/100/image"
}
},
"id": 100,
"name": "Kintsugi",
"compilation": false,
"imageURL": "http://localhost:3000/albums/100/image",
"_embedded": {
"artist": {
"_links": {
"self": {
"href": "http://localhost:3000/artists/934"
},
"albums": {
"href": "http://localhost:3000/artists/934/albums"
},
"tracks": {
"href": "http://localhost:3000/artists/934/tracks"
}
},
"id": 934,
"name": "Death Cab for Cutie"
},
"composer": {
"_links": {
"self": {
"href": "http://localhost:3000/artists/934"
},
"albums": {
"href": "http://localhost:3000/artists/934/albums"
},
"tracks": {
"href": "http://localhost:3000/artists/934/tracks"
}
},
"id": 934,
"name": "Death Cab for Cutie"
}
}
},
{
"_links": {
"self": {
"href": "http://localhost:3000/albums/4321"
},
"tracks": {
"href": "http://localhost:3000/albums/4321/tracks"
},
"artist": {
"href": "http://localhost:3000/artists/9874"
},
"image": {
"href": "http://localhost:3000/album/101/image"
}
},
"id": 101,
"name": "No Deal",
"compilation": false,
"imageURL": "http://localhost:3000/albums/101/image",
"_embedded": {
"artist": {
"_links": {
"self": {
"href": "http://localhost:3000/artists/934"
},
"albums": {
"href": "http://localhost:3000/artists/934/albums"
},
"tracks": {
"href": "http://localhost:3000/artists/934/tracks"
}
},
"id": 9874,
"name": "Melanie De Biasio"
},
"composer": {
"_links": {
"self": {
"href": "http://localhost:3000/artists/934"
},
"albums": {
"href": "http://localhost:3000/artists/934/albums"
},
"tracks": {
"href": "http://localhost:3000/artists/934/tracks"
}
},
"id": 934,
"name": "Death Cab for Cutie"
}
}
}
]
}
}HTTP status code 400
Bad request
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
},
"description": {
"type": "string"
},
"debug": {
"type": "object"
}
},
"additionalProperties": false,
"required": [
"code",
"message",
"description"
]
}
},
"additionalProperties": false,
"required": [
"error"
]
}Example:
{
"error": {
"code": 1301,
"message": "Some headline error message",
"description": "A more detailed description of the error"
}
}
Everything to do with artists
Returns the available operations on this resource
Returns a paginated collection of artists
get /search/artists
Returns a paginated collection of artists
Query Parameters
- query: (string)
A JSON array describing the query;
URL encoded query string. Full matching rules to be determined from existing UIDD
Example:
http://localhost:3000/search/artists?query=Death%20Cab%20for%20Cutie
- response: (one of lite, standard, full - default: standard)
Provides the option to tailor the verbosity of the response information. If not specified the default is standard.
- pageSize: (number - default: 50)
The number of items per page
- page: (number - default: 0)
The page number to return
HTTP status code 200
artists schema and artists sample data included
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"_links": {
"type": "object",
"properties": {
"self": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
}
},
"required": [
"self"
]
},
"count": {
"type": "integer"
},
"total": {
"type": "integer"
},
"_embedded": {
"type": "object",
"properties": {
"artists": {
"type": "array",
"items": {
"$ref": "http://localhost:3000/v1/schemas/artist.json"
}
}
},
"additionalProperties": false,
"required": [
"artists"
]
}
},
"additionalProperties": false,
"required": [
"_links",
"count",
"total",
"_embedded"
]
}Example:
{
"_links": {
"self": {
"href": "http://localhost:3000/artists"
},
"next": {
"href": "http://localhost:3000/artists?page=2"
},
"last": {
"href": "http://localhost:3000/artists?page=100"
}
},
"count": 2,
"total": 10,
"_embedded": {
"artists": [
{
"_links": {
"self": {
"href": "http://localhost:3000/artists/964"
},
"albums": {
"href": "http://localhost:3000/artists/964/albums"
},
"tracks": {
"href": "http://localhost:3000/artists/964/tracks"
}
},
"id": 964,
"name": "Death Cab for Cutie"
},
{
"_links": {
"self": {
"href": "http://localhost:3000/artists/964"
},
"albums": {
"href": "http://localhost:3000/artists/964/albums"
},
"tracks": {
"href": "http://localhost:3000/artists/964/tracks"
}
},
"id": 964,
"name": "Death Cab for Cutie"
}
]
}
}HTTP status code 400
Bad request
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
},
"description": {
"type": "string"
},
"debug": {
"type": "object"
}
},
"additionalProperties": false,
"required": [
"code",
"message",
"description"
]
}
},
"additionalProperties": false,
"required": [
"error"
]
}Example:
{
"error": {
"code": 1301,
"message": "Some headline error message",
"description": "A more detailed description of the error"
}
}
Everything to do with tracks
Returns the available operations on this resource
Returns a paginated collection of tracks
get /search/tracks
Returns a paginated collection of tracks
Query Parameters
- query: (string)
A JSON array describing the query;
URL encoded query string. Full matching rules to be determined from existing UIDD
Example:
http://localhost:3000/search/tracks?query=Black%20Sun
- response: (one of lite, standard, full - default: standard)
Provides the option to tailor the verbosity of the response information. If not specified the default is standard.
- pageSize: (number - default: 50)
The number of items per page
- page: (number - default: 0)
The page number to return
HTTP status code 200
tracks schema and tracks sample data included
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"_links": {
"type": "object",
"properties": {
"self": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
}
},
"required": [
"self"
]
},
"count": {
"type": "integer"
},
"total": {
"type": "integer"
},
"_embedded": {
"type": "object",
"properties": {
"tracks": {
"type": "array",
"items": {
"$ref": "http://localhost:3000/v1/schemas/track.json"
}
}
},
"additionalProperties": false,
"required": [
"tracks"
]
}
},
"additionalProperties": false,
"required": [
"_links",
"count",
"total",
"_embedded"
]
}Example:
{
"_links": {
"self": {
"href": "http://localhost:3000/tracks"
},
"next": {
"href": "http://localhost:3000/tracks?page=2"
},
"last": {
"href": "http://localhost:3000/tracks?page=100"
}
},
"count": 2,
"total": 100,
"_embedded": {
"tracks": [
{
"_links": {
"self": {
"href": "http://localhost:3000/tracks/602"
},
"album": {
"href": "http://localhost:3000/albums/964"
},
"artist": {
"href": "http://localhost:3000/artists/5435"
},
"stream": {
"href": "http://localhost:3000/tracks/602/stream"
}
},
"id": 602,
"name": "Black Sun",
"duration": 180,
"position": 2,
"_embedded": {
"album": {
"_links": {
"self": {
"href": "http://localhost:3000/albums/934"
},
"tracks": {
"href": "http://localhost:3000/albums/964/tracks"
},
"artist": {
"href": "http://localhost:3000/artists/5435"
}
},
"id": 934,
"name": "Kintsugi",
"imageURL": "http://localhost:3000/images/yosemite.jpg"
},
"artist": {
"_links": {
"self": {
"href": "http://localhost:3000/artists/934"
},
"albums": {
"href": "http://localhost:3000/artists/934/albums"
},
"tracks": {
"href": "http://localhost:3000/artists/934/tracks"
}
},
"id": 934,
"name": "Death Cab for Cutie"
},
"albumArtist": {
"_links": {
"self": {
"href": "http://localhost:3000/artists/934"
},
"albums": {
"href": "http://localhost:3000/artists/934/albums"
},
"tracks": {
"href": "http://localhost:3000/artists/934/tracks"
}
},
"id": 934,
"name": "Death Cab for Cutie"
},
"composer": {
"_links": {
"self": {
"href": "http://localhost:3000/artists/934"
},
"albums": {
"href": "http://localhost:3000/artists/934/albums"
},
"tracks": {
"href": "http://localhost:3000/artists/934/tracks"
}
},
"id": 934,
"name": "Death Cab for Cutie"
}
}
},
{
"_links": {
"self": {
"href": "http://localhost:3000/tracks/603"
},
"album": {
"href": "http://localhost:3000/albums/964"
},
"artist": {
"href": "http://localhost:3000/artists/5435"
},
"stream": {
"href": "http://localhost:3000/tracks/602/stream"
}
},
"id": 603,
"name": "The Ghosts Of Beverly Drive",
"duration": 240,
"position": 3,
"_embedded": {
"album": {
"_links": {
"self": {
"href": "http://localhost:3000/albums/934"
},
"tracks": {
"href": "http://localhost:3000/albums/964/tracks"
},
"artist": {
"href": "http://localhost:3000/artists/5435"
}
},
"id": 934,
"name": "Kintsugi",
"imageURL": "http://localhost:3000/images/yosemite.jpg"
},
"artist": {
"_links": {
"self": {
"href": "http://localhost:3000/artists/934"
},
"albums": {
"href": "http://localhost:3000/artists/934/albums"
},
"tracks": {
"href": "http://localhost:3000/artists/934/tracks"
}
},
"id": 934,
"name": "Death Cab for Cutie"
},
"albumArtist": {
"_links": {
"self": {
"href": "http://localhost:3000/artists/934"
},
"albums": {
"href": "http://localhost:3000/artists/934/albums"
},
"tracks": {
"href": "http://localhost:3000/artists/934/tracks"
}
},
"id": 934,
"name": "Death Cab for Cutie"
},
"composer": {
"_links": {
"self": {
"href": "http://localhost:3000/artists/934"
},
"albums": {
"href": "http://localhost:3000/artists/934/albums"
},
"tracks": {
"href": "http://localhost:3000/artists/934/tracks"
}
},
"id": 934,
"name": "Death Cab for Cutie"
}
}
}
]
}
}HTTP status code 400
Bad request
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
},
"description": {
"type": "string"
},
"debug": {
"type": "object"
}
},
"additionalProperties": false,
"required": [
"code",
"message",
"description"
]
}
},
"additionalProperties": false,
"required": [
"error"
]
}Example:
{
"error": {
"code": 1301,
"message": "Some headline error message",
"description": "A more detailed description of the error"
}
}
Everything to do with composers
Returns the available operations on this resource
Returns a paginated collection of composers
get /search/composers
Returns a paginated collection of composers
Query Parameters
- query: (string)
A JSON array describing the query;
URL encoded query string. Full matching rules to be determined from existing UIDD
Example:
http://localhost:3000/search/tracks?query=Richard
- response: (one of lite, standard, full - default: standard)
Provides the option to tailor the verbosity of the response information. If not specified the default is standard.
- pageSize: (number - default: 50)
The number of items per page
- page: (number - default: 0)
The page number to return
HTTP status code 200
composers schema and composers sample data included
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"_links": {
"type": "object",
"properties": {
"self": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
}
},
"required": [
"self"
]
},
"count": {
"type": "integer"
},
"total": {
"type": "integer"
},
"_embedded": {
"type": "object",
"properties": {
"artists": {
"type": "array",
"items": {
"$ref": "http://localhost:3000/v1/schemas/artist.json"
}
}
},
"additionalProperties": false,
"required": [
"artists"
]
}
},
"additionalProperties": false,
"required": [
"_links",
"count",
"total",
"_embedded"
]
}Example:
{
"_links": {
"self": {
"href": "http://localhost:3000/composers"
},
"next": {
"href": "http://localhost:3000/composers?page=2"
},
"last": {
"href": "http://localhost:3000/composers?page=100"
}
},
"count": 2,
"total": 10,
"_embedded": {
"composers": [
{
"_links": {
"self": {
"href": "http://localhost:3000/composers/33"
},
"albums": {
"href": "http://localhost:3000/composers/33/albums"
},
"tracks": {
"href": "http://localhost:3000/composers/33/tracks"
}
},
"id": 33,
"name": "Richard D James"
},
{
"_links": {
"self": {
"href": "http://localhost:3000/composers/33"
},
"albums": {
"href": "http://localhost:3000/composers/33/albums"
},
"tracks": {
"href": "http://localhost:3000/composers/33/tracks"
}
},
"id": 33,
"name": "Richard D James"
}
]
}
}HTTP status code 400
Bad request
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
},
"description": {
"type": "string"
},
"debug": {
"type": "object"
}
},
"additionalProperties": false,
"required": [
"code",
"message",
"description"
]
}
},
"additionalProperties": false,
"required": [
"error"
]
}Example:
{
"error": {
"code": 1301,
"message": "Some headline error message",
"description": "A more detailed description of the error"
}
}
Everything to do with podcasts
Returns the available operations on this resource
Returns a paginated collection of podcasts
get /search/podcasts
Returns a paginated collection of podcasts
Query Parameters
- query: (string)
A JSON array describing the query;
URL encoded query string. Full matching rules to be determined from existing UIDD
Example:
http://localhost:3000/search/podcasts?query=The%20Food%20Chain
- response: (one of lite, standard, full - default: standard)
Provides the option to tailor the verbosity of the response information. If not specified the default is standard.
- pageSize: (number - default: 50)
The number of items per page
- page: (number - default: 0)
The page number to return
HTTP status code 200
podcasts schema and podcasts sample data included
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"_links": {
"type": "object",
"properties": {
"self": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
}
},
"required": [
"self"
]
},
"count": {
"type": "integer"
},
"total": {
"type": "integer"
},
"_embedded": {
"type": "object",
"properties": {
"podcasts": {
"type": "array",
"items": {
"$ref": "http://localhost:3000/v1/schemas/podcast.json"
}
}
},
"additionalProperties": false,
"required": [
"podcasts"
]
}
},
"additionalProperties": false,
"required": [
"_links",
"count",
"total",
"_embedded"
]
}Example:
{
"count": 2,
"total": 2,
"_links": {
"self": {
"href": "http://192.168.1.106:3000/podcasts"
},
"first": {
"href": "http://192.168.1.106:3000/podcasts?page=1&pageSize=50"
},
"last": {
"href": "http://192.168.1.106:3000/podcasts?page=1&pageSize=50"
}
},
"_embedded": {
"podcasts": [
{
"id": 3,
"name": "Alan Davies As Yet Untitled",
"episodeCount": 1,
"imageURL": "http://192.168.1.106:3000/podcasts/3/image",
"_links": {
"self": {
"href": "http://192.168.1.106:3000/podcasts/3"
},
"author": {
"href": "http://192.168.1.106:3000/authors/3"
},
"episodes": {
"href": "http://192.168.1.106:3000/podcasts/3/episodes"
},
"image": {
"href": "http://192.168.1.106:3000/podcasts/3/image"
}
},
"_embedded": {
"author": {
"id": 3,
"name": "Dave",
"_links": {
"self": {
"href": "http://192.168.1.106:3000/authors/3"
},
"podcasts": {
"href": "http://192.168.1.106:3000/authors/3/podcasts"
},
"episodes": {
"href": "http://192.168.1.106:3000/authors/3/episodes"
}
}
}
}
},
{
"id": 2,
"name": "Podcast 1",
"episodeCount": 2,
"imageURL": "http://192.168.1.106:3000/podcasts/2/image",
"_links": {
"self": {
"href": "http://192.168.1.106:3000/podcasts/2"
},
"author": {
"href": "http://192.168.1.106:3000/authors/2"
},
"episodes": {
"href": "http://192.168.1.106:3000/podcasts/2/episodes"
},
"image": {
"href": "http://192.168.1.106:3000/podcasts/2/image"
}
},
"_embedded": {
"author": {
"id": 2,
"name": "Author 1",
"_links": {
"self": {
"href": "http://192.168.1.106:3000/authors/2"
},
"podcasts": {
"href": "http://192.168.1.106:3000/authors/2/podcasts"
},
"episodes": {
"href": "http://192.168.1.106:3000/authors/2/episodes"
}
}
}
}
}
]
}
}HTTP status code 400
Bad request
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
},
"description": {
"type": "string"
},
"debug": {
"type": "object"
}
},
"additionalProperties": false,
"required": [
"code",
"message",
"description"
]
}
},
"additionalProperties": false,
"required": [
"error"
]
}Example:
{
"error": {
"code": 1301,
"message": "Some headline error message",
"description": "A more detailed description of the error"
}
}
Tracks
Everything to do with tracks
Returns the available operations on this resource
Returns a paginated collection of tracks
get /tracks
Returns a paginated collection of tracks
Query Parameters
- response: (one of lite, standard, full - default: standard)
Provides the option to tailor the verbosity of the response information. If not specified the default is standard.
- pageSize: (number - default: 50)
The number of items per page
- page: (number - default: 0)
The page number to return
HTTP status code 200
tracks schema and tracks sample data included
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"_links": {
"type": "object",
"properties": {
"self": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
}
},
"required": [
"self"
]
},
"count": {
"type": "integer"
},
"total": {
"type": "integer"
},
"_embedded": {
"type": "object",
"properties": {
"tracks": {
"type": "array",
"items": {
"$ref": "http://localhost:3000/v1/schemas/track.json"
}
}
},
"additionalProperties": false,
"required": [
"tracks"
]
}
},
"additionalProperties": false,
"required": [
"_links",
"count",
"total",
"_embedded"
]
}Example:
{
"_links": {
"self": {
"href": "http://localhost:3000/tracks"
},
"next": {
"href": "http://localhost:3000/tracks?page=2"
},
"last": {
"href": "http://localhost:3000/tracks?page=100"
}
},
"count": 2,
"total": 100,
"_embedded": {
"tracks": [
{
"_links": {
"self": {
"href": "http://localhost:3000/tracks/602"
},
"album": {
"href": "http://localhost:3000/albums/964"
},
"artist": {
"href": "http://localhost:3000/artists/5435"
},
"stream": {
"href": "http://localhost:3000/tracks/602/stream"
}
},
"id": 602,
"name": "Black Sun",
"duration": 180,
"position": 2,
"_embedded": {
"album": {
"_links": {
"self": {
"href": "http://localhost:3000/albums/934"
},
"tracks": {
"href": "http://localhost:3000/albums/964/tracks"
},
"artist": {
"href": "http://localhost:3000/artists/5435"
}
},
"id": 934,
"name": "Kintsugi",
"imageURL": "http://localhost:3000/images/yosemite.jpg"
},
"artist": {
"_links": {
"self": {
"href": "http://localhost:3000/artists/934"
},
"albums": {
"href": "http://localhost:3000/artists/934/albums"
},
"tracks": {
"href": "http://localhost:3000/artists/934/tracks"
}
},
"id": 934,
"name": "Death Cab for Cutie"
},
"albumArtist": {
"_links": {
"self": {
"href": "http://localhost:3000/artists/934"
},
"albums": {
"href": "http://localhost:3000/artists/934/albums"
},
"tracks": {
"href": "http://localhost:3000/artists/934/tracks"
}
},
"id": 934,
"name": "Death Cab for Cutie"
},
"composer": {
"_links": {
"self": {
"href": "http://localhost:3000/artists/934"
},
"albums": {
"href": "http://localhost:3000/artists/934/albums"
},
"tracks": {
"href": "http://localhost:3000/artists/934/tracks"
}
},
"id": 934,
"name": "Death Cab for Cutie"
}
}
},
{
"_links": {
"self": {
"href": "http://localhost:3000/tracks/603"
},
"album": {
"href": "http://localhost:3000/albums/964"
},
"artist": {
"href": "http://localhost:3000/artists/5435"
},
"stream": {
"href": "http://localhost:3000/tracks/602/stream"
}
},
"id": 603,
"name": "The Ghosts Of Beverly Drive",
"duration": 240,
"position": 3,
"_embedded": {
"album": {
"_links": {
"self": {
"href": "http://localhost:3000/albums/934"
},
"tracks": {
"href": "http://localhost:3000/albums/964/tracks"
},
"artist": {
"href": "http://localhost:3000/artists/5435"
}
},
"id": 934,
"name": "Kintsugi",
"imageURL": "http://localhost:3000/images/yosemite.jpg"
},
"artist": {
"_links": {
"self": {
"href": "http://localhost:3000/artists/934"
},
"albums": {
"href": "http://localhost:3000/artists/934/albums"
},
"tracks": {
"href": "http://localhost:3000/artists/934/tracks"
}
},
"id": 934,
"name": "Death Cab for Cutie"
},
"albumArtist": {
"_links": {
"self": {
"href": "http://localhost:3000/artists/934"
},
"albums": {
"href": "http://localhost:3000/artists/934/albums"
},
"tracks": {
"href": "http://localhost:3000/artists/934/tracks"
}
},
"id": 934,
"name": "Death Cab for Cutie"
},
"composer": {
"_links": {
"self": {
"href": "http://localhost:3000/artists/934"
},
"albums": {
"href": "http://localhost:3000/artists/934/albums"
},
"tracks": {
"href": "http://localhost:3000/artists/934/tracks"
}
},
"id": 934,
"name": "Death Cab for Cutie"
}
}
}
]
}
}HTTP status code 400
Bad request
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
},
"description": {
"type": "string"
},
"debug": {
"type": "object"
}
},
"additionalProperties": false,
"required": [
"code",
"message",
"description"
]
}
},
"additionalProperties": false,
"required": [
"error"
]
}Example:
{
"error": {
"code": 1301,
"message": "Some headline error message",
"description": "A more detailed description of the error"
}
}
Respresentation of a track resource
Returns the available operations on this resource
Returns the track with the given id
get /tracks/{id}
Returns the track with the given id
URI Parameters
- id: required (string)
track identifier
Query Parameters
- response: (one of lite, standard, full - default: standard)
Provides the option to tailor the verbosity of the response information. If not specified the default is standard.
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"_links": {
"type": "object",
"properties": {
"self": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
},
"album": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
},
"artist": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
},
"stream": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
}
},
"required": [
"self",
"album",
"artist",
"stream"
]
},
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"duration": {
"type": "integer"
},
"position": {
"type": "integer"
},
"compilation": {
"type": "boolean"
},
"_embedded": {
"type": "object",
"properties": {
"album": {
"type": "object",
"$ref": "http://localhost:3000/v1/schemas/album-lite.json"
},
"artist": {
"type": "object",
"$ref": "http://localhost:3000/v1/schemas/artist.json"
},
"albumArtist": {
"type": "object",
"$ref": "http://localhost:3000/v1/schemas/artist.json"
}
},
"additionalProperties": false,
"required": [
"artist",
"album",
"albumArtist"
]
}
},
"additionalProperties": false,
"required": [
"_links",
"id",
"name",
"duration",
"position",
"_embedded"
]
}Example:
{
"_links": {
"self": {
"href": "http://localhost:3000/tracks/602"
},
"album": {
"href": "http://localhost:3000/albums/964"
},
"artist": {
"href": "http://localhost:3000/artists/5435"
},
"stream": {
"href": "http://localhost:3000/tracks/602/stream"
}
},
"id": 602,
"name": "Black Sun",
"duration": 180,
"format": "AAC",
"position": 2,
"compilation": false,
"genre": "Indie Rock",
"bitRate": 192,
"sampleRate": 44100,
"_embedded": {
"album": {
"_links": {
"self": {
"href": "http://localhost:3000/albums/964"
},
"tracks": {
"href": "http://localhost:3000/albums/964/tracks"
},
"artist": {
"href": "http://localhost:3000/artists/5435"
}
},
"id": 964,
"name": "Kintsugi",
"imageURL": "http://localhost:3000/images/yosemite.jpg"
},
"artist": {
"_links": {
"self": {
"href": "http://localhost:3000/artists/934"
},
"albums": {
"href": "http://localhost:3000/artists/964/albums"
},
"tracks": {
"href": "http://localhost:3000/artists/964/tracks"
}
},
"id": 934,
"name": "Death Cab for Cutie"
},
"albumArtist": {
"_links": {
"self": {
"href": "http://localhost:3000/artists/934"
},
"albums": {
"href": "http://localhost:3000/artists/964/albums"
},
"tracks": {
"href": "http://localhost:3000/artists/964/tracks"
}
},
"id": 934,
"name": "Death Cab for Cutie"
},
"composer": {
"_links": {
"self": {
"href": "http://localhost:3000/artists/934"
},
"albums": {
"href": "http://localhost:3000/artists/964/albums"
},
"tracks": {
"href": "http://localhost:3000/artists/964/tracks"
}
},
"id": 934,
"name": "Death Cab for Cutie"
},
"genres": [
{
"_links": {
"self": {
"href": "http://localhost:3000/genres/2"
},
"albums": {
"href": "http://localhost:3000/genres/2/albums"
}
},
"id": 2,
"name": "Pop"
}
]
}
}HTTP status code 404
Resource not found
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
},
"description": {
"type": "string"
},
"debug": {
"type": "object"
}
},
"additionalProperties": false,
"required": [
"code",
"message",
"description"
]
}
},
"additionalProperties": false,
"required": [
"error"
]
}Example:
{
"error": {
"code": 1301,
"message": "Some headline error message",
"description": "A more detailed description of the error"
}
}
Now we get to play something
Returns the available operations on this resource
This is the actual stream URL for the track with the given id
get /tracks/{id}/stream
This is the actual stream URL for the track with the given id
URI Parameters
- id: required (string)
track identifier
HTTP status code 200
The exact mime type will depend on the audio format being served
Body
Type: audio/mpeg
HTTP status code 404
Resource not found
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
},
"description": {
"type": "string"
},
"debug": {
"type": "object"
}
},
"additionalProperties": false,
"required": [
"code",
"message",
"description"
]
}
},
"additionalProperties": false,
"required": [
"error"
]
}Example:
{
"error": {
"code": 1301,
"message": "Some headline error message",
"description": "A more detailed description of the error"
}
}