Skip to content
ID: getArtist

Get an artist

GET
/api/v1/artists/{artistId}

Learn more about a specific Argentine Rock artist and their legacy.

Parameters

Path Parameters

artistId*
Typeinteger
Required
Example1

Responses

Artist Found
JSON
{
"id": 1,
"name": "Charly García",
"description": "One of the most influential rock musicians in Argentine history.",
"image": "https://cdn.rock-legends.com/photos/charly.jpg",
"band": "Sui Generis"
}

Samples

Bruno
get {
  url: https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/artists/1
}

headers {
  Content-Type: application/json
}
Bruno
get {
  url: https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/artists/1
}

headers {
  Content-Type: application/json
}
cURL
curl -X GET \
'https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/artists/1' \
 -H "Content-Type: application/json"
JavaScript
fetch('https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/artists/1', {headers:{'Content-Type':'application/json'}})
  .then(response => response.json())
  .then(data => console.log(data));
PHP
<?php
$url = 'https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/artists/1';
$method = 'GET';
$headers = [
    'Content-Type' => 'application/json',
];

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$response = curl_exec($ch);
curl_close($ch);

echo $response;
?>
Python
import requests

url = 'https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/artists/1'

headers = {
    'Content-Type': 'application/json'
}

response = requests.get(url, headers=headers)
print(response.json())
Powered by VitePress OpenAPI