Skip to main content
GET
/
productions
{
  "productions": [
    {
      "id": "<string>",
      "show_id": "<string>",
      "theatre_id": "<string>",
      "opening_date": "<string>",
      "closing_date": "<string>",
      "show": {}
    }
  ]
}

Overview

Returns a list of all productions (show runs at specific theatres) in the database. Optionally filter by theatre ID.

Query Parameters

theatre_id
string
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

productions
array
Array of production objects

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

StatusDescription
200Success - returns array of productions
500Server error