Overview
Returns a list of all productions (show runs at specific theatres) in the database. Optionally filter by theatre ID.
Query Parameters
Filter productions by theatre ID
Request
# Get all productions
curl https://entertheatre.com/api/productions
# Filter by theatre
curl https://entertheatre.com/api/productions?theatre_id=theatre-001
Response
Array of production objects Unique identifier for the production
ID of the associated show
ID of the theatre where the production runs
Opening date of the production (ISO 8601 format)
Closing date of the production (ISO 8601 format), null if open-ended
Nested show object with full show details
Example Response
[
{
"id" : "prod-001" ,
"show_id" : "550e8400-e29b-41d4-a716-446655440000" ,
"theatre_id" : "theatre-001" ,
"opening_date" : "1986-10-09" ,
"closing_date" : null ,
"show" : {
"id" : "550e8400-e29b-41d4-a716-446655440000" ,
"name" : "The Phantom of the Opera" ,
"type" : "musical" ,
"description" : "Andrew Lloyd Webber's legendary musical..." ,
"image" : "https://rluylvquemmzgljdklby.supabase.co/storage/v1/object/public/shows/phantom.jpg"
}
},
{
"id" : "prod-002" ,
"show_id" : "550e8400-e29b-41d4-a716-446655440001" ,
"theatre_id" : "theatre-002" ,
"opening_date" : "2017-12-21" ,
"closing_date" : null ,
"show" : {
"id" : "550e8400-e29b-41d4-a716-446655440001" ,
"name" : "Hamilton" ,
"type" : "musical" ,
"description" : "The story of America's founding father..." ,
"image" : "https://rluylvquemmzgljdklby.supabase.co/storage/v1/object/public/shows/hamilton.jpg"
}
}
]
Status Codes
Status Description 200Success - returns array of productions 500Server error