feature-flags

2 endpoints.

GET/api/feature-flags Bearer token

List the feature flags

Every optional feature of this deployment and its state. A `disabled` feature's endpoints answer 404 with the error `feature_disabled` whatever the caller may otherwise do, and its pages answer 404; a `hidden` one keeps working but is left out of the sidebar and the dashboards. The directory, users, learning records, subject matters, certifications and search are not optional and are not listed.

Responses

StatusDescriptionBody
200Every feature and its state.FeatureFlagList
401The access token is missing or invalid.ErrorResponse
500The feature flags could not be read.ErrorResponse
PATCH/api/feature-flags Bearer token

Set feature flags

Sets the state of each named feature, all at once; a feature left out keeps its state. Switching a feature off deletes nothing — its records, attempts and files stay where they are, and switching it back on brings them back. Takes effect on the next request. Requires a superuser's access token.

Request body

application/jsonrequiredUpdateFeatureFlagsRequest
FieldTypeRequiredDescription
featuresarray of FeatureFlagChangeyes

The features to set, each named at most once. A feature left out keeps its state.

1–9 items

Responses

StatusDescriptionBody
200Every feature and its state, after the change.FeatureFlagList
400The request body failed validation: an unknown feature or state, or a feature named twice.ErrorResponse
401The access token is missing or invalid.ErrorResponse
403The access token's subject is not a superuser.ErrorResponse
500The feature flags could not be written to.ErrorResponse