trainer-dashboard

4 endpoints.

GET/api/trainer-dashboard/default-exclusions Bearer token

Read 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

StatusDescriptionBody
200The default list.DashboardExclusionDefaults
401The access token is missing or invalid.ErrorResponse
500The default list could not be read.ErrorResponse
PUT/api/trainer-dashboard/default-exclusions Bearer token

Replace 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.

Request body

application/jsonrequiredUpdateDashboardExclusionDefaultsRequest
FieldTypeRequiredDescription
rulesarray of stringyes

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

StatusDescriptionBody
200The default list as now stored.DashboardExclusionDefaults
400The request body failed validation.ErrorResponse
401The access token is missing or invalid.ErrorResponse
403The access token's subject is not a superuser.ErrorResponse
500The default list could not be saved.ErrorResponse
GET/api/users/me/trainer-dashboard-exclusions Bearer token

Read 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

StatusDescriptionBody
200The caller's exclusions.TrainerDashboardExclusions
401The access token is missing or invalid.ErrorResponse
500The exclusions could not be read.ErrorResponse
PUT/api/users/me/trainer-dashboard-exclusions Bearer token

Replace 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.

Request body

application/jsonrequiredUpdateTrainerDashboardExclusionsRequest
FieldTypeRequiredDescription
addedarray of stringyes

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_defaultsarray of stringyes

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

StatusDescriptionBody
200The caller's exclusions as now stored.TrainerDashboardExclusions
400The request body failed validation, or names a rule in both lists.ErrorResponse
401The access token is missing or invalid.ErrorResponse
500The exclusions could not be saved.ErrorResponse