Overview
The Feature Flags API allows administrators to check and toggle feature flags that control various system behaviors and validations. Feature flags enable dynamic configuration without code deployments.Authentication
All endpoints require:- Valid authentication token
- Administrator role/permissions
- Bearer token in Authorization header
Feature Structure
Features contain the following fields:| Field | Type | Description |
|---|---|---|
feature_id | integer | Unique identifier for the feature |
name | string | Feature flag name (immutable) |
scope | string | Feature scope (global scope is __laravel_null) |
value | string | Current feature value/state |
created_at | datetime | When the feature was created |
updated_at | datetime | When the feature was last modified |
Available Features
The following feature flags are available in the system:| Feature Name | Description |
|---|---|
allow_discord_notifications | Enable/disable Discord notification integration |
audio_bitrate_restriction | Set audio bitrate validation requirements |
enabled_only_on_localhost | Restrict certain features to localhost only |
ignore_all_file_validations | Bypass all file validation checks |
required_encoder_version | Specify required encoder version for uploads |
video_bitrate_restriction | Set video bitrate validation requirements |
video_codec_stream | Specify allowed video codec |
video_color_primaries_stream | Specify required color primaries |
video_color_space_stream | Specify required color space |
video_color_transfer_stream | Specify required color transfer characteristics |
video_pixel_format_stream | Specify required pixel format |
Endpoints
List Features
Get a list of all global feature flags.This endpoint only returns features with global scope (
__laravel_null).- Standard pagination and filtering parameters
- Supports field selection and includes
Get Feature
Retrieve a specific feature flag by ID.id- The feature ID
Update Feature
Update a feature flag’s value.id- The feature ID
Usage Examples
Toggle a Boolean Feature
Update Video Codec Requirement
Check Current Features
Feature Value Types
Feature values are stored as strings but represent different types:Boolean Features
Boolean Features
Store as
"true" or "false" strings.Examples:allow_discord_notificationsignore_all_file_validationsenabled_only_on_localhost
String/Enum Features
String/Enum Features
Store specific values like codec names or format specifications.Examples:
video_codec_stream:"h264","h265", etc.video_pixel_format_stream:"yuv420p", etc.video_color_space_stream:"bt709", etc.
Numeric Features
Numeric Features
Store numeric values as strings.Examples:
audio_bitrate_restriction:"320000"video_bitrate_restriction:"5000000"required_encoder_version:"1.2.3"
Common Use Cases
Media Upload Validation
Several features control video and audio file validation:Integration Toggles
Control external service integrations:Best Practices
Test Before Production
Test Before Production
When changing feature flags, test in a non-production environment first, especially for validation-related features.
Document Changes
Document Changes
Keep a log of feature flag changes and the reasons for modifications, as they can significantly impact system behavior.
Gradual Rollout
Gradual Rollout
For critical features, consider using scoped features (if available) to test changes with a subset of users before global deployment.
Monitor Impact
Monitor Impact
After changing feature flags, monitor system metrics and error rates to ensure the change has the desired effect.
Limitations
- Feature flags cannot be created or deleted via the API
- Only the
valuefield can be modified - The API only exposes globally scoped features
- Feature name and scope are immutable
Related
Announcements
Manage site announcements
Feature Flags Guide
Learn about feature flags