Skip to content
Toggle `Group by tags` to see the effect
v1.0.0

Argentine Rock Legends

The Argentine Rock Legends is an example OpenAPI specification to test OpenAPI tools and libraries. Get all the data for all artists.

Inspired by Scalar Galaxy

Resources

  • https://github.com/enzonotario/vitepress-openapi
  • https://github.com/OAI/OpenAPI-Specification

Markdown Support

All descriptions can contain tons of text Markdown. If GitHub supports the syntax, chances are we’re supporting it, too. You can even create internal links to reference endpoints.

Examples

Blockquotes

I love Argentine Rock. <3

Tables

Feature Availability
Markdown Support

Accordion

<details>
  <summary>Using Details Tags</summary>
  <p>HTML Example</p>
</details>

Images

Yes, there’s support for images, too!

Placeholder image

Contact

Servers

https://stoplight.io/mocks/enzonotario/argentine-rock/122547792Mock Server

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

Samples

cURL
curl -X GET https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/artists
JavaScript
fetch("https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/artists")
  .then(response => response.json())
  .then(data => console.log(data));
PHP
file_get_contents("https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/artists");
Python
import requests
response = requests.get("https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/artists")
print(response.json())

Add a new artist

POST
/api/v1/artists

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

Authorizations

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

Samples

cURL
curl -X POST https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/artists
JavaScript
fetch("https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/artists", { method: "POST" })
  .then(response => response.json())
  .then(data => console.log(data));
PHP
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/artists");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Python
import requests
response = requests.post("https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/artists")
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"
}

Samples

cURL
curl -X GET https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/artists/{artistId}
JavaScript
fetch("https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/artists/{artistId}")
  .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}");
Python
import requests
response = requests.get("https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/artists/{artistId}")
print(response.json())

Update an artist

PUT
/api/v1/artists/{artistId}

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

Authorizations

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

Samples

cURL
curl -X PUT https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/artists/{artistId}
JavaScript
fetch("https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/artists/{artistId}", { method: "PUT" })
  .then(response => response.json())
  .then(data => console.log(data));
PHP
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/artists/{artistId}");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Python
import requests
response = requests.put("https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/artists/{artistId}")
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

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

Samples

cURL
curl -X DELETE https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/artists/{artistId}
JavaScript
fetch("https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/artists/{artistId}", { method: "DELETE" })
  .then(response => response.json())
  .then(data => console.log(data));
PHP
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/artists/{artistId}");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Python
import requests
response = requests.delete("https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/artists/{artistId}")
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"
}
}

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())

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

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

Samples

cURL
curl -X POST 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", { method: "POST" })
  .then(response => response.json())
  .then(data => console.log(data));
PHP
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/artists/{artistId}/albums");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Python
import requests
response = requests.post("https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/artists/{artistId}/albums")
print(response.json())

Authentication

Some endpoints are public, but some require authentication. We provide all the required endpoints to create an account and authorize yourself.


Create a user

POST
/api/v1/user/signup

Create a user account to access exclusive content about Argentine Rock legends.

Request Body

JSON
{
"name": "Maria",
"email": "carlos@rock-legends.com",
"password": "rock-n-roll"
}

Responses

Created
JSON
{
"id": 1,
"name": "Carlos",
"email": "carlos@rock-legends.com"
}

Samples

cURL
curl -X POST https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/user/signup
JavaScript
fetch("https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/user/signup", { method: "POST" })
  .then(response => response.json())
  .then(data => console.log(data));
PHP
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/user/signup");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Python
import requests
response = requests.post("https://stoplight.io/mocks/enzonotario/argentine-rock/122547792/api/v1/user/signup")
print(response.json())

Powered by VitePress OpenAPI