Get Production
curl --request GET \
--url https://api.example.com/productions/{id}import requests
url = "https://api.example.com/productions/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/productions/{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/productions/{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/productions/{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/productions/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/productions/{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>",
"show_id": "<string>",
"theatre_id": "<string>",
"opening_date": "<string>",
"closing_date": "<string>"
}Productions
Get Production
Retrieve a specific production by ID
GET
/
productions
/
{id}
Get Production
curl --request GET \
--url https://api.example.com/productions/{id}import requests
url = "https://api.example.com/productions/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/productions/{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/productions/{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/productions/{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/productions/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/productions/{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>",
"show_id": "<string>",
"theatre_id": "<string>",
"opening_date": "<string>",
"closing_date": "<string>"
}Overview
Returns detailed information about a single production identified by its unique ID.Path Parameters
string
required
The unique identifier of the production
Request
curl https://entertheatre.com/api/productions/prod-001
const productionId = 'prod-001';
const response = await fetch(`https://entertheatre.com/api/productions/${productionId}`);
const production = await response.json();
import requests
production_id = 'prod-001'
response = requests.get(f'https://entertheatre.com/api/productions/{production_id}')
production = response.json()
Response
string
required
Unique identifier for the production
string
required
ID of the associated show
string
required
ID of the theatre where the production runs
string
required
Opening date of the production (ISO 8601 format)
string
Closing date of the production (ISO 8601 format), null if open-ended
Example Response
{
"id": "prod-001",
"show_id": "550e8400-e29b-41d4-a716-446655440000",
"theatre_id": "theatre-001",
"opening_date": "1986-10-09",
"closing_date": null
}
Error Response
{
"error": "Production not found"
}
Status Codes
| Status | Description |
|---|---|
200 | Success - returns production object |
404 | Production not found |
500 | Server error |