> ## Documentation Index
> Fetch the complete documentation index at: https://docs.entertheatre.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List Roles

> Retrieve all character roles

## 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

<CodeGroup>
  ```bash cURL theme={null}
  curl https://entertheatre.com/api/roles
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://entertheatre.com/api/roles');
  const roles = await response.json();
  ```

  ```python Python theme={null}
  import requests

  response = requests.get('https://entertheatre.com/api/roles')
  roles = response.json()
  ```
</CodeGroup>

## Response

<ResponseField name="roles" type="array">
  Array of role objects

  <Expandable title="Role Object">
    <ResponseField name="id" type="string" required>
      Unique identifier for the role
    </ResponseField>

    <ResponseField name="name" type="string" required>
      Name of the character/role
    </ResponseField>

    <ResponseField name="description" type="string">
      Description of the character
    </ResponseField>

    <ResponseField name="production_id" type="string" required>
      ID of the production this role belongs to
    </ResponseField>
  </Expandable>
</ResponseField>

### Example Response

```json theme={null}
[
  {
    "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

| Status | Description                      |
| ------ | -------------------------------- |
| `200`  | Success - returns array of roles |
| `500`  | Server error                     |
