Get all albums
GET
/api/v1/artists/{artistId}/albumsGet a list of all albums from a legendary Argentine Rock artist.
Parameters
Path Parameters
artistId*
Typeinteger
RequiredExample
1
Query Parameters
limit
The number of items to return
Typeinteger
offset
The number of items to skip before starting to collect the result set
Typeinteger
Responses
OK
JSON
{
"data": [
{
"id": 1,
"name": "La Máquina de Hacer Pájaros",
"year": 1976,
"image": "https://cdn.rock-legends.com/photos/la-maquina.jpg"
}
],
"meta": {
"limit": 10,
"offset": 0,
"total": 100,
"next": "/artists?limit=10&offset=10"
}
}
Samples
cURL
curl -X GET https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/artists/{artistId}/albums
JavaScript
fetch("https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/artists/{artistId}/albums")
.then(response => response.json())
.then(data => console.log(data));
PHP
file_get_contents("https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/artists/{artistId}/albums");
Python
import requests
response = requests.get("https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/artists/{artistId}/albums")
print(response.json())