Skip to main content

Recent Searches

to navigate esc to close
enter to select

Documentation

Last updated: 2 days ago 5 min read

Rollout.site provides a comprehensive platform for managing feature flags and deployments. Get started quickly with our intuitive interface and powerful API.

Key Features

  • Feature flag management
  • A/B testing capabilities
  • Gradual rollouts
  • User targeting
  • Real-time analytics
npm installation
npm install rollout-site
yarn installation
yarn add rollout-site
Basic Usage
import { Rollout } from 'rollout-site';

const rollout = new Rollout({
  apiKey: 'your-api-key'
});

// Check if feature is enabled
const isEnabled = await rollout.isEnabled('feature-name');

API Reference

Complete reference documentation for the Rollout.site API

Authentication

API Key Authentication
Authorization: Bearer your-api-key

Endpoints

GET /api/v1/features
Returns a list of all feature flags

Response

{
  "features": [
    {
      "id": "feature-1",
      "name": "Dark Mode",
      "enabled": true
    }
  ]
}
POST /api/v1/features
Create a new feature flag

Request Body

{
  "name": "New Feature",
  "description": "Feature description",
  "enabled": false
}

Response Codes

200 OK
401 Unauthorized
404 Not Found
500 Server Error

Code Examples

Learn how to implement Rollout.site with practical examples

Basic Integration

import { RolloutClient } from 'rollout-site';

const client = new RolloutClient({
  apiKey: 'your-api-key',
  environment: 'production'
});

// Check if feature is enabled
const isEnabled = await client.isFeatureEnabled('new-ui');
if (isEnabled) {
  // Show new UI
} else {
  // Show old UI
}
from rollout_site import RolloutClient

client = RolloutClient(
    api_key='your-api-key',
    environment='production'
)

# Check if feature is enabled
is_enabled = client.is_feature_enabled('new-ui')
if is_enabled:
    # Show new UI
else:
    # Show old UI
require 'rollout_site'

client = RolloutSite::Client.new(
  api_key: 'your-api-key',
  environment: 'production'
)

# Check if feature is enabled
if client.feature_enabled?('new-ui')
  # Show new UI
else
  # Show old UI
end

User Targeting

const user = {
  id: 'user-123',
  email: 'user@example.com',
  groups: ['beta-testers']
};

const isEnabled = await client.isFeatureEnabled('new-ui', user);
user = {
    'id': 'user-123',
    'email': 'user@example.com',
    'groups': ['beta-testers']
}

is_enabled = client.is_feature_enabled('new-ui', user)
user = {
  id: 'user-123',
  email: 'user@example.com',
  groups: ['beta-testers']
}

is_enabled = client.feature_enabled?('new-ui', user)

A/B Testing

const experiment = await client.getExperiment('button-color');
switch(experiment.variant) {
  case 'control':
    showBlueButton();
    break;
  case 'variant-a':
    showRedButton();
    break;
  case 'variant-b':
    showGreenButton();
    break;
}

Quick Start Guide

Get up and running with Rollout.site in minutes

1

Installation

npm
npm install rollout-site
yarn
yarn add rollout-site
2

Configuration

Initialize Client
import { RolloutClient } from 'rollout-site';

const client = new RolloutClient({
    apiKey: 'your-api-key',
    environment: 'development'
});
3

Basic Usage

Check Feature Flag
// Check if feature is enabled
const isEnabled = await client.isFeatureEnabled('new-feature');

if (isEnabled) {
    // Feature is enabled
    showNewFeature();
} else {
    // Feature is disabled
    showOldFeature();
}

Documentation Versions

View documentation for different versions of Rollout.site

Current Version

v1.0.0 Latest

Previous Versions

v0.9.0 Released: 2 months ago
v0.8.0 Released: 4 months ago
v0.7.0 Released: 6 months ago
Switch Version