Get Theatre
curl --request GET \
--url https://api.example.com/theatres/{id}import requests
url = "https://api.example.com/theatres/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/theatres/{id}', 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/theatres/{id}",
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/theatres/{id}"
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/theatres/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/theatres/{id}")
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{
"id": "<string>",
"name": "<string>",
"address": "<string>",
"postcode": "<string>",
"lat": 123,
"lng": 123,
"capacity": 123,
"current_show_id": "<string>"
}Theatres
Get Theatre
Retrieve a specific theatre by ID
GET
/
theatres
/
{id}
Get Theatre
curl --request GET \
--url https://api.example.com/theatres/{id}import requests
url = "https://api.example.com/theatres/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/theatres/{id}', 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/theatres/{id}",
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/theatres/{id}"
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/theatres/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/theatres/{id}")
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{
"id": "<string>",
"name": "<string>",
"address": "<string>",
"postcode": "<string>",
"lat": 123,
"lng": 123,
"capacity": 123,
"current_show_id": "<string>"
}Overview
Returns detailed information about a single theatre venue identified by its unique ID.Path Parameters
string
required
The unique identifier of the theatre
Request
curl https://entertheatre.com/api/theatres/theatre-001
const theatreId = 'theatre-001';
const response = await fetch(`https://entertheatre.com/api/theatres/${theatreId}`);
const theatre = await response.json();
import requests
theatre_id = 'theatre-001'
response = requests.get(f'https://entertheatre.com/api/theatres/{theatre_id}')
theatre = response.json()
Response
string
required
Unique identifier for the theatre
string
required
Name of the theatre
string
Street address of the theatre
string
UK postcode
number
Latitude coordinate
number
Longitude coordinate
number
Seating capacity of the theatre
string
ID of the show currently running at this theatre
Example Response
{
"id": "theatre-001",
"name": "Her Majesty's Theatre",
"address": "Haymarket",
"postcode": "SW1Y 4QL",
"lat": 51.5094,
"lng": -0.1313,
"capacity": 1216,
"current_show_id": "550e8400-e29b-41d4-a716-446655440000"
}
Error Response
{
"error": "Theatre not found"
}
Status Codes
| Status | Description |
|---|---|
200 | Success - returns theatre object |
404 | Theatre not found |
500 | Server error |