Skip to content

Artists

Everything about Argentine Rock artists


Get all artists

GET
/api/v1/artists

Get a list of all legendary Argentine Rock artists and explore their contributions to the music scene.

Parameters

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": "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"
}
],
"meta": {
"limit": 10,
"offset": 0,
"total": 100,
"next": "/artists?limit=10&offset=10"
}
}
Variables
Key
Value
limit
offset

Samples

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

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

headers {
  Content-Type: application/json
}
PHP
curl -X GET \
'https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/artists' \
 -H "Content-Type: application/json"
Python
fetch('https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/artists', {headers:{'Content-Type':'application/json'}})
  .then(response => response.json())
  .then(data => console.log(data));

Add a new artist

POST
/api/v1/artists

Add a new legendary Argentine Rock artist. Make sure they truly deserve the title!

Authorizations

bearerAuth
Type: HTTP (bearer)

Request Body

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"
}

Responses

Created
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"
}
Authorization
bearerAuth
Body
{
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

cURL
curl -X POST \
'https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/artists' \
 -H "Content-Type: application/json" \
 -H "authorization: Bearer Bearer Token" \
 --data '{
  "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"
}'
JavaScript
fetch('https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/artists', {method:'POST',headers:{'Content-Type':'application/json','authorization':'Bearer Bearer Token'},body:'{"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"}'})
  .then(response => response.json())
  .then(data => console.log(data));
PHP
<?php
$url = 'https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/artists';
$method = 'POST';
$headers = [
    'Content-Type' => 'application/json',
    'authorization' => 'Bearer Bearer Token',
];
$body = json_encode({"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"});

$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);
curl_setopt($ch, CURLOPT_POSTFIELDS, $body);

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

echo $response;
?>
Python
import requests

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

headers = {
    'Content-Type': 'application/json',
    'authorization': 'Bearer Bearer Token'
}
data = {
    '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'
}

response = requests.post(url, headers=headers, json=data)
print(response.json())

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"
}
Variables
Key
Value
artistId*

Samples

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

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

headers {
  Content-Type: application/json
}
PHP
curl -X GET \
'https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/artists/1' \
 -H "Content-Type: application/json"
Python
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));

Update an artist

PUT
/api/v1/artists/{artistId}

Update the information of a legendary Argentine Rock artist. Make sure to provide accurate data.

Authorizations

bearerAuth
Type: HTTP (bearer)

Parameters

Path Parameters

artistId*
Typeinteger
Required
Example1

Request Body

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"
}

Responses

OK
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"
}
Authorization
bearerAuth
Variables
Key
Value
artistId*
Body
{
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

cURL
curl -X PUT \
'https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/artists/1' \
 -H "Content-Type: application/json" \
 -H "authorization: Bearer Bearer Token" \
 --data '{
  "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"
}'
JavaScript
fetch('https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/artists/1', {method:'PUT',headers:{'Content-Type':'application/json','authorization':'Bearer Bearer Token'},body:'{"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"}'})
  .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 = 'PUT';
$headers = [
    'Content-Type' => 'application/json',
    'authorization' => 'Bearer Bearer Token',
];
$body = json_encode({"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"});

$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);
curl_setopt($ch, CURLOPT_POSTFIELDS, $body);

$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',
    'authorization': 'Bearer Bearer Token'
}
data = {
    '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'
}

response = requests.put(url, headers=headers, json=data)
print(response.json())

Deprecated

Delete an artist

DELETE
/api/v1/artists/{artistId}

This endpoint was used to delete artists. Unfortunately, that caused a lot of controversy. So, this endpoint is now deprecated and should not be used anymore.

Authorizations

bearerAuth
Type: HTTP (bearer)

Parameters

Path Parameters

artistId*
Typeinteger
Required
Example1

Responses

Bad Request
JSON
{
"type": "https://example.com/errors/generic-error",
"title": "Something went wrong here.",
"status": 403,
"detail": "Unfortunately, we can’t provide further information."
}
Authorization
bearerAuth
Variables
Key
Value
artistId*

Samples

cURL
curl -X DELETE \
'https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/artists/1' \
 -H "Content-Type: application/json" \
 -H "authorization: Bearer Bearer Token"
JavaScript
fetch('https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/artists/1', {method:'DELETE',headers:{'Content-Type':'application/json','authorization':'Bearer Bearer Token'}})
  .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 = 'DELETE';
$headers = [
    'Content-Type' => 'application/json',
    'authorization' => 'Bearer Bearer Token',
];

$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',
    'authorization': 'Bearer Bearer Token'
}

response = requests.delete(url, headers=headers)
print(response.json())

Get all albums

GET
/api/v1/artists/{artistId}/albums

Get a list of all albums from a legendary Argentine Rock artist.

Parameters

Path Parameters

artistId*
Typeinteger
Required
Example1

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"
}
}
Variables
Key
Value
artistId*
limit
offset

Samples

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

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

headers {
  Content-Type: application/json
}
PHP
curl -X GET \
'https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/artists/1/albums' \
 -H "Content-Type: application/json"
Python
fetch('https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/artists/1/albums', {headers:{'Content-Type':'application/json'}})
  .then(response => response.json())
  .then(data => console.log(data));

Add a new album

POST
/api/v1/artists/{artistId}/albums

Add a new album to a legendary Argentine Rock artist. Make sure it’s a masterpiece!

Authorizations

bearerAuth
Type: HTTP (bearer)

Parameters

Path Parameters

artistId*
Typeinteger
Required
Example1

Request Body

JSON
{
"id": 1,
"name": "La Máquina de Hacer Pájaros",
"year": 1976,
"image": "https://cdn.rock-legends.com/photos/la-maquina.jpg"
}

Responses

Created
JSON
{
"id": 1,
"name": "La Máquina de Hacer Pájaros",
"year": 1976,
"image": "https://cdn.rock-legends.com/photos/la-maquina.jpg"
}
Authorization
bearerAuth
Variables
Key
Value
artistId*
Body
{
id
:
1
name
:
La Máquina de Hacer Pájaros
year
:
1976
image
:
https://cdn.rock-legends.com/photos/la-maquina.jpg

Samples

cURL
curl -X POST \
'https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/artists/1/albums' \
 -H "Content-Type: application/json" \
 -H "authorization: Bearer Bearer Token" \
 --data '{
  "id": 1,
  "name": "La Máquina de Hacer Pájaros",
  "year": 1976,
  "image": "https://cdn.rock-legends.com/photos/la-maquina.jpg"
}'
JavaScript
fetch('https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/artists/1/albums', {method:'POST',headers:{'Content-Type':'application/json','authorization':'Bearer Bearer Token'},body:'{"id":1,"name":"La Máquina de Hacer Pájaros","year":1976,"image":"https://cdn.rock-legends.com/photos/la-maquina.jpg"}'})
  .then(response => response.json())
  .then(data => console.log(data));
PHP
<?php
$url = 'https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/artists/1/albums';
$method = 'POST';
$headers = [
    'Content-Type' => 'application/json',
    'authorization' => 'Bearer Bearer Token',
];
$body = json_encode({"id":1,"name":"La Máquina de Hacer Pájaros","year":1976,"image":"https://cdn.rock-legends.com/photos/la-maquina.jpg"});

$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);
curl_setopt($ch, CURLOPT_POSTFIELDS, $body);

$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/albums'

headers = {
    'Content-Type': 'application/json',
    'authorization': 'Bearer Bearer Token'
}
data = {
    'id': 1,
    'name': 'La Máquina de Hacer Pájaros',
    'year': 1976,
    'image': 'https://cdn.rock-legends.com/photos/la-maquina.jpg'
}

response = requests.post(url, headers=headers, json=data)
print(response.json())

Powered by VitePress OpenAPI