Skip to main content
GET
/
roles
{
  "roles": [
    {
      "id": "<string>",
      "name": "<string>",
      "description": "<string>",
      "production_id": "<string>"
    }
  ]
}

Overview

Returns a list of all roles/characters defined in the database. Roles are linked to productions and can be assigned to cast members.

Request

curl https://entertheatre.com/api/roles

Response

roles
array
Array of role objects

Example Response

[
  {
    "id": "role-001",
    "name": "Grizabella",
    "description": "The glamour cat who sings 'Memory'",
    "production_id": "prod-005"
  },
  {
    "id": "role-002",
    "name": "Jean Valjean",
    "description": "The protagonist, a former convict seeking redemption",
    "production_id": "prod-003"
  },
  {
    "id": "role-003",
    "name": "The Phantom",
    "description": "The mysterious masked figure who haunts the Paris Opera House",
    "production_id": "prod-001"
  },
  {
    "id": "role-004",
    "name": "Christine Daaé",
    "description": "The young soprano and love interest of the Phantom",
    "production_id": "prod-001"
  }
]

Status Codes

StatusDescription
200Success - returns array of roles
500Server error