- URL: /api/albums/
- HTTP Method: GET
[
{
"name": "My Favorite Things",
"slug": "my-favorite-things",
"url": "http://jmad.us/api/albums/1/"
},
{
"name": "Kind of Blue",
"slug": "kind-of-blue",
"url": "http://jmad.us/api/albums/2/
}
...
]
- URL: /api/albums/<pk>/
- HTTP Method: GET
{
"name": "The Shape of Jazz to Come",
"slug": "the-shape-of-jazz-to-come",
"tracks": [
{
"name": "Lonely Woman",
"track_number": 1,
"slug": "lonely-woman",
"url": "http://jmad.us/api/tracks/42/"
}
...
]
}
- URL: /api/tracks/<pk>/
- HTTP Method: GET
{
"name": "All Blues",
"slug": "all-blues",
"album": {
"name": "Kind of Blue",
"url": "http://jmad.us/api/albums/2/"
},
"solos": [
{
"artist": "Cannonball Adderley",
"instrument": "saxophone",
"start_time": "4:05",
"end_time": "6:04",
"slug": "cannonball-adderley",
"url": "http://jmad.us/api/solos/281/"
},
...
]
}
- URL: /api/solos/
- HTTP Method: POST
{
"track": “/api/tracks/83/”,
"artist": "Don Cherry",
"instrument": "cornet",
"start_time": "2:13",
"end_time": "3:54"
}
{
"url": "http://jmad.us/api/solos/64/",
"artist": "Don Cherry",
"slug": "don-cherry",
"instrument": "cornet",
"start_time": "2:13",
"end_time": "3:54",
"track": "http://jmad.us/api/tracks/83/"
}
- URL: /api/solos/<pk>/
- HTTP Method: PATCH
{
"start_time": "1:46",
"end_time": "4:04"
}
HTTP 200 OK
{
"artist": "Miles Davis",
"instrument": "trumpet",
"start_time": "1:46",
"end_time": "4:04",
"track": {
"name": "All Blues",
"url": "http://jmad.us/api/tracks/113/"
}
}