trainer-dashboard
4 endpoints.
/api/trainer-dashboard/default-exclusions Bearer tokenRead the trainer dashboard's default exclusions
The email domains and addresses every trainer dashboard leaves out of its team progress by default — a deployment's own staff and test accounts, say — whatever roles they hold.
Responses
| Status | Description | Body |
|---|---|---|
| 200 | The default list. | DashboardExclusionDefaults |
| 401 | The access token is missing or invalid. | ErrorResponse |
| 500 | The default list could not be read. | ErrorResponse |
/api/trainer-dashboard/default-exclusions Bearer tokenReplace the trainer dashboard's default exclusions
Replaces the email domains and addresses every trainer dashboard leaves out by default. A trainer who turned a default off, or left out more of their own, keeps those choices; a default added here reaches every trainer. Requires a superuser's access token.
| Field | Type | Required | Description |
|---|---|---|---|
| rules | array of string | yes | Replaces the default list; `[]` leaves nobody out by default. Trainers' own choices are kept. Email domains (`@example.com`, every address there but not its subdomains) and whole addresses (`qa@example.com`), stored lowercased, a bare domain with its `@`. at most 20 items |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | The default list as now stored. | DashboardExclusionDefaults |
| 400 | The request body failed validation. | ErrorResponse |
| 401 | The access token is missing or invalid. | ErrorResponse |
| 403 | The access token's subject is not a superuser. | ErrorResponse |
| 500 | The default list could not be saved. | ErrorResponse |
/api/users/me/trainer-dashboard-exclusions Bearer tokenRead the caller's trainer dashboard exclusions
Which email domains and addresses the caller's trainer dashboard leaves out of its team progress, and how that list is made: the deployment's defaults (see `GET /api/trainer-dashboard/default-exclusions`), each marked whether it applies to the caller, and the caller's own on top.
Responses
| Status | Description | Body |
|---|---|---|
| 200 | The caller's exclusions. | TrainerDashboardExclusions |
| 401 | The access token is missing or invalid. | ErrorResponse |
| 500 | The exclusions could not be read. | ErrorResponse |
/api/users/me/trainer-dashboard-exclusions Bearer tokenReplace the caller's trainer dashboard exclusions
Sets how the caller's trainer dashboard departs from the deployment's defaults: the accounts it leaves out on top of them, and the defaults it does not apply. A default added later applies unless the caller turns it off too. Send both lists empty to go back to the defaults alone.
| Field | Type | Required | Description |
|---|---|---|---|
| added | array of string | yes | Replaces the accounts the caller leaves out on top of the defaults. Email domains (`@example.com`, every address there but not its subdomains) and whole addresses (`qa@example.com`), stored lowercased, a bare domain with its `@`. at most 20 items |
| dismissed_defaults | array of string | yes | Replaces the defaults the caller does not apply. A rule that is not a default does nothing unless a superuser makes it one. Both lists empty puts the caller back on the defaults alone. Email domains (`@example.com`, every address there but not its subdomains) and whole addresses (`qa@example.com`), stored lowercased, a bare domain with its `@`. at most 20 items |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | The caller's exclusions as now stored. | TrainerDashboardExclusions |
| 400 | The request body failed validation, or names a rule in both lists. | ErrorResponse |
| 401 | The access token is missing or invalid. | ErrorResponse |
| 500 | The exclusions could not be saved. | ErrorResponse |