List Shows
curl --request GET \
--url https://api.example.com/showsimport requests
url = "https://api.example.com/shows"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/shows', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/shows",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/shows"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/shows")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/shows")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"shows": [
{
"id": "<string>",
"name": "<string>",
"type": "<string>",
"description": "<string>",
"image": "<string>",
"booking_until": "<string>"
}
]
}Shows
List Shows
Retrieve all theatre shows
GET
/
shows
List Shows
curl --request GET \
--url https://api.example.com/showsimport requests
url = "https://api.example.com/shows"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/shows', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/shows",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/shows"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/shows")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/shows")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"shows": [
{
"id": "<string>",
"name": "<string>",
"type": "<string>",
"description": "<string>",
"image": "<string>",
"booking_until": "<string>"
}
]
}Overview
Returns a list of all theatre shows in the database. Shows include musicals, plays, comedies, and dramas currently or recently running in the West End.Request
curl https://entertheatre.com/api/shows
const response = await fetch('https://entertheatre.com/api/shows');
const shows = await response.json();
import requests
response = requests.get('https://entertheatre.com/api/shows')
shows = response.json()
Response
Array of show objects
Show Show Object
Show Show Object
Example Response
[
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "The Phantom of the Opera",
"type": "musical",
"description": "Andrew Lloyd Webber's legendary musical about a mysterious phantom who haunts the Paris Opera House.",
"image": "https://rluylvquemmzgljdklby.supabase.co/storage/v1/object/public/shows/phantom.jpg",
"booking_until": "2025-06-30"
},
{
"id": "550e8400-e29b-41d4-a716-446655440001",
"name": "Hamilton",
"type": "musical",
"description": "The story of America's founding father Alexander Hamilton, told through hip-hop music.",
"image": "https://rluylvquemmzgljdklby.supabase.co/storage/v1/object/public/shows/hamilton.jpg",
"booking_until": "2025-12-31"
},
{
"id": "550e8400-e29b-41d4-a716-446655440002",
"name": "The Mousetrap",
"type": "play",
"description": "Agatha Christie's world-famous murder mystery, the longest-running show in West End history.",
"image": "https://rluylvquemmzgljdklby.supabase.co/storage/v1/object/public/shows/mousetrap.jpg",
"booking_until": null
}
]
Status Codes
| Status | Description |
|---|---|
200 | Success - returns array of shows |
500 | Server error |
⌘I