Feature Flags
A Feature object looks like:
{
// The symbolic name of the feature, used in FeatureFlags
"feature": "fancy_wickets",
// The user-visible name of the feature
"display_name": "Fancy Wickets",
// The type of object the feature applies to (SiteAdmin, RootAccount, Account,
// Course, User, or InheritableUser):
// * SiteAdmin features may only be controlled by flags on the site admin
// account.
// * RootAccount features may only be controlled by flags on root accounts.
// * Account features may be controlled by flags on accounts and their parent
// accounts.
// * Course features may be controlled by flags on courses and their parent
// accounts.
// * User features may be controlled by flags on users and site admin only.
// * InheritableUser features may be controlled by flags on users or on the root
// account; the root account flag is inherited by all users in that root
// account.
"applies_to": "Course",
// The FeatureFlag that applies to the caller
"feature_flag": {"feature":"fancy_wickets","state":"allowed"},
// If true, a feature that is 'allowed' globally will be 'off' by default in
// root accounts. Otherwise, root accounts inherit the global 'allowed' setting,
// which allows sub-accounts and courses to turn features on with no root
// account action.
"root_opt_in": true,
// Whether the feature is a feature preview. If true, opting in includes ongoing
// updates outside the regular release schedule.
"beta": true,
// Indicates the feature is part of the Early Access Program.
"early_access_program": false,
// Whether the details of the feature are autoexpanded on page load vs. the user
// clicking to expand.
"autoexpand": true,
// A URL to the release notes describing the feature
"release_notes_url": "http://canvas.example.com/release_notes#fancy_wickets"
}A FeatureFlag object looks like:
List features
GET /api/v1/courses/:course_id/features
GET /api/v1/accounts/:account_id/features
GET /api/v1/users/:user_id/features
Request Parameters:
Parameter
Type
Description
Example Request:
List enabled features
GET /api/v1/courses/:course_id/features/enabled
GET /api/v1/accounts/:account_id/features/enabled
GET /api/v1/users/:user_id/features/enabled
Example Request:
Example Response:
List environment features
GET /api/v1/features/environment
Example Request:
Example Response:
Get feature flag
GET /api/v1/courses/:course_id/features/flags/:feature
GET /api/v1/accounts/:account_id/features/flags/:feature
GET /api/v1/users/:user_id/features/flags/:feature
Example Request:
Set feature flag
PUT /api/v1/courses/:course_id/features/flags/:feature
PUT /api/v1/accounts/:account_id/features/flags/:feature
PUT /api/v1/users/:user_id/features/flags/:feature
Request Parameters:
Parameter
Type
Description
Example Request:
Remove feature flag
DELETE /api/v1/courses/:course_id/features/flags/:feature
DELETE /api/v1/accounts/:account_id/features/flags/:feature
DELETE /api/v1/users/:user_id/features/flags/:feature
Example Request:
Last updated
Was this helpful?